Yet more git syntax I keep forgetting. To branch and create a new line of development from a specific commit, do the following:
git branch newbranchname a9c146a09505837ec03b
-b switch to immediately checkout after branching.
Since the commit will likley be behind, use
--force when pushing to tell git to ignore future commits from the original branch and start a new fork.
Cygwin and Windows git stopped playing nicely together after a recent Windows update. There’s a variety of recommendations for how to fix this this on StackOverflow and elsewhere, but this post actually makes the most sense. In a nutshell, msys-1.0.dll (installed into your Program Files\Git\bin directory) is not built to be position independent. Use the dll rebaser to get it to load at a new address, like so:
$ rebase.exe -b 0x50000000 msys-1.0.dll
And voila, git goodness restored.
Discovered a nice little git trick today. I haven’t seen this documented, so I’m not sure if it’s a feature per se, but if you set your user.name via git config like so:
name = accountname
email = email@example.com
and then commit with the
--author="Full Name" flag set to another name, this will set git’s commit metadata such that “Author:” is “Full Name” and “Committer:” is “accountname”.
Useful when you want to see the Author in your git logs and the Committer in tools like Hudson or Jenkins.