Tuesday, 3 June 2014

Setting up a repository for your work and hello world

At AMS we will be using Github for storing and sharing our work.  We will use cloud9 for making and running our work.  This setup has a number of features.

Firstly this is publicly available - anyone can see your code, you can comment on each others code and help each other out.

Secondly Using these two tools together we are not reliant on the schools computers to run our software.  Our programs may run a little slower (although still blazingly fast). However we will be using a linux machine - which is what you may be using as a work computer, also there is no way that anybody can be accused of trying to tamper with the internal school system because your programs are not in the schools network.

It is possible to download your programs onto your home computers and run them there, but this is not something that we will discuss yet.


Key reference

git commands:

git status - lets you know what the status of your git repository is - should give you clues as to what you need to do next.

git add . - Note the space between the add and the dot - adds any untracked files to the git tracker

git commit -a -m"put a message here" - commits the changes you have made to the git stage - in effect saves the repository in the cloud 9 git ready to be pushed back to github.

git push origin master - pushes whatever is committed back to where it came from (origin - github) on the master branch.  

Python Commands

print() - Prints the contents of the brackets to the screen.

python file.py - runs file.py where file.py is a python program.


No comments:

Post a Comment