|Version 1 (modified by 6 years ago) (diff),|
GIT notes by Simon PJ
Here are notes about using Git that Simon PJ has found useful.
When you say
git push (with no arguments), push only only patches on
the current branch. If you have un-pushed commits on other branches, leave them be.
git config --global remote.origin.push HEAD
Suppose you create a new branch on your local machine. Now you want to push
it up to the global repo. You almost certainly want your local branch to become
a tracking option of the remote one, so that
git pull will merge changes to
the remote copy into your local copy.
git config --global branch.autosetupmerge true
Looking at the current state of affairs
git diff --statgives you a one-line-per-file summary of diffs.
git gui on Windows
I’ve been using
git gui (on Windows at least) as a way to examine and stage changes. But I suddenly found that it wasn’t displaying the diff in the main pane.
A google search http://code.google.com/p/msysgit/issues/detail?id=394 suggested that (bizarrely) it might have something to do with ‘nice’.
So I renamed
c:/cygwin/bin/nice.exe to c:/cygwin/bin/cygin-nice.exe, and that made
git gui worked fine. Wierd.