Setup
To use git on turing, you should configure your ID.
Do this with these two commands:
git config --global user.name "Your Full Name Here"
git config --global user.email "your@email.address"
Clone
Each group member should now be able to clone of the repository. From turing,
type
git clone https://github.com/SLU-OS-Fall-2015/slush-team-xx.git
where you need to put your team code in place of the xx. git will ask you for your GitHub username and password.
This will create a directory called
slush-team-xx
with a README file in it, ready for you to work.
Use git
You can now move files into the slush directory and edit them.
When you add a file, you need to tell git about it. Once you make a file
called slush.c, you would type:
git add slush.c
After you make changes to a file, you need to commit them.
An easy way to do this is:
git commit -am "explanation of your changes"
To send your committed changes to GitHub, you type:
git push
and to pull your partner's changes from GitHub, type:
git pull
If you and your partner both change the same file at the same time, git does
it's best to merge the files. It is probably best to avoid this situation
until you are more comfortable using git.
Take it further
git is very powerful, and these instructions give you no real understanding of how it works.
If you want to learn more, there are plenty of online instructions for using github and git. A good place to start is
Pro Git by Scott Chacon.