This guide provides some basics for how to use git for your lab work in this class. It also has links to additional git resources.
The first step to using git is to set up a remote bare master repository for your shared project. Next, you and your partner clone local working copies into your own private subdirectories. Finally, you each commit changes to your local copies and push and pull changes to and from the remote master to share work.
[~]$ setup81 Usage: setup81 <assignment> <partner> Make a mistake? Reset an unused assignment using setup81 <assignment> --reset You need to specify the lab to setup Here are available assignments to setup labs/01 (Partner optional)For a partner assignment, suppose partners with usernames Molly and Tejas are collaborating on the first lab. One partner, say Molly, should run
[~]$ setup81 labs/01 tejasOnce Molly's script has finished, Tejas can run
[~]$ setup81 labs/01 molly
git help # list common git commands git help --all lists all commands git add # add changes or new files to the next commit git rm # remove a file at the next commit git commit # commit your changes to your local repository git push # push your committed changes to the remote master repository # (note: the first time you may have to do: push origin master git pull # pull changes pushed to remote master into your local copy # (git will try to merge changes into your copy) git mv # move a repo file git diff # see a diff between a file(s) and latest commit (local repo) git status # see what has changed between your copy and the master version