Git Notes
Revision as of 16:34, 30 April 2012 by PeterHarding (talk | contribs) (Created page with " h1. Branching * gitbranch \--set-upstream xxx origin/xxx * git branch \-a * git push origin xxx * git push origin xxx:yyy * git checkout remote/origin/zzz h2. Low Level Stu...")
h1. Branching
- gitbranch \--set-upstream xxx origin/xxx
- git branch \-a
- git push origin xxx
- git push origin xxx:yyy
- git checkout remote/origin/zzz
h2. Low Level Stuff
$ cd .git/reps/heads $ ls $ cat xxx $ cd ../objects/db $ ls
- git checkout e79ff9e ==> Detached HEAD
- git branch yesterday e79ff9e5926bd
h1. Remotes
- git reote \-v
- git remote another [1]
- git remote add tim git://xxxxx@xxxx.com/xxx/repo.git
- git fetch originhttps
- git fetch
- git diff xxx origin/xxx
h1. Broadcasting a Local Repo
- git serve
h1. Reviewing
- git log \--graph \--pretty=oneline
- git log -- ../bin/chk_lrs.py
- git diff xxx origin/xxx \--word-diff
- git diff master^\^ origin/master \--word-diff
h1. After a Conflict
- git diff
- git checkout \--ours -- the_file
- git checkout \--theirs -- the_file
h1. Other
- git pull origin \+master:master
Note, this will discard local changes\!