add tips for using git

This commit is contained in:
Samuel Li 2017-02-08 14:53:52 -07:00
parent b6a2f49400
commit 9d1392562f

22
git_tips Normal file

@ -0,0 +1,22 @@
I keep two branches:
latest
master
I have to remotes: (git remote -vv)
kitware
origin
I let "latest" branch to keep track of kitware, and "master" to track origin:
git branch --set-upstream-to=kitware/master latest
git branch --set-upstream-to=origin/master master
I can update the "latest" branch by switching to that branch and use a "git pull."
I can merge my "master" branch to whatever is updated from "latest" branch:
git merge latest
Set a remote for current branch:
git branch -u kitware/master
Fetch objects from a remote:
git fetch kitware