Saint's Log

29Sep/100

Git Exercise

Having not used git that much, I cloned an ANTLR repository and then did my main development (and the associated commits) on the main branch. In order to submit my work, I needed to create one patch file with all the necessary changes. However, git format-patch was creating one .patch file for each commit. Some googling around led me to stackoverflow where the basic outline of how to fix this situation was clear. Based on those suggestions, and the fact that there had been no remote changes that I needed to merge, I came up with:

git checkout -b submission 76b45
git merge --squash master
git commit -a -m "Submission of work..."
git format-patch 76b45