Git tips - Vaa3D/Vaa3D_Wiki GitHub Wiki

For Vaa3D developers that are used to SVN:

SSH Access

Once you have the developer push access, make sure your remote origin is set up accordingly so that you don't have to enter password every time when you check in your code:

https://help.github.com/articles/generating-an-ssh-key/

If you do git remote -v, you should see the following (instead of the https url):

[email protected]:Vaa3D/v3d_external.git

[email protected]:Vaa3D/vaa3d_tools.git

Daily workflow

Similar to svn status:

git status

Similar to svn up, you can do :

git pull

If you have local commits that are older than the upstream master branch commits, to avoid merge commits, it's better to use:

git pull --rebase

Similar to 'svn ci -m ', you can do:

git commit

It should pop up a page (default usually is vim for mac and linx) for you to enter the commit message. The header should be a one-liner description, and you could write detailed descriptions starting a separate line to explain the changes if you will.

Then, after reviewing your commit msg using :

git log

You need to push your local commits to the public repo by :

git push

It's easy to see a specific commit changes by:

git show <SHA commit ID>

Some helpful tools for visualizing branch status, identifying merge conflicts, etc are available from the command line with most git installs: gitk shows the repo history, diffs, branches and merges git gui is a simple interface for the basic operations

For more git tips, please check : https://www.atlassian.com/git/tutorials/ and git- the simple guide