Converting commits to patch files? HEAD vs HEAD^
- From
- Marc Singer <elf@buici.com>
- Date
- Jul 9, 2005, 01:38 UTC
- Message-ID
- <20050709013859.GA11947@buici.com>
Jeff Garzik's guide doesn't appear to explain how to get patches back out of the system.
I've successfully commited a set of changes.
# git diff HEAD^ HEAD
This command will produce a diff of the changes I've made. What is the HEAD^? Does it refer to the commit before the last one made?
If I've made several commits, I'd like to be able to gather several together and produce a patch file. Better still, I'd like to be able to pick a set of discontiguous commits an bundle them into a single patch. Ought I be using tags?
Finally, given that the upstream repository is git, what is the way to push commits upstream?