Git Notes

From PeformIQ Upgrade
Revision as of 15: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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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\!