GETTING STARTED Here are some initial things which are good to setup before you start using Git e.g. with a GUI. Git uses these to identify you when you make changes: $ git config --global user.name "Richard E. Turner" $ git config --global user.email "richard.e.turner@gmail.com" Check this $ config user.name (global sets for all projects) Set the text editor $ git config --global core.editor 'emacs' $ cd myproject $ git init Creates a .git directory which is the repository $ git add . $ git commit -m 'initial commit' $ git log To see all the changes. After the first commit you can use qgit to manage the project. SYNCHRONISING TO NYU Here's the way I've done this - in addition to the copy of the repository on my local machine, it involves a copy on my NYU webspace which I can PUSH changes to, and a separate copy on NYU which I run my simulations from. So, in total there are three repositories. first create a local `bare' copy of the repository $ git clone --bare myproject baremyproject then zip up the bare project $ zip bareproj.zip bareproject -r move this to your NYU webspace and unzip it $ unzip bareproj.zip now go back to the original repository, you can push changes via: $ git push /locationofNYUbarecopy/ This last step relies on having mounted NYU using sshfs (see below) MOUNTING YOUR NYU FILE SPACE AS A LOCAL DIRECTORY let username = you user name localmountpoint = where you want your NYU files to appear: $ sshfs -o workaround=rename username@annio.cns.nyu.edu:/users-lcv/username localmountpoint BRANCHING AND MERGING Branching and merging are super-useful when developing code. Here are some steps to setup a new branch and merge it back into the old one. Look at the current branches: $ git branch Create a new branch $ git branch newbranch Look at branches and currently active branch: $ git branch Currently active branch is starred Switch to the new branch $ git checkout newbranch To check that we've selected the new branch: $ git branch Check that newbranch is starred. If you add/modify files, then they will appear only in the selected branch. To merge one branch into another, switch to the branch you want to merge into (e.g. via $ git checkout master) and then run: $ git merge newbranch