Submitted by bartman (not verified) on Sat, 05/10/2008 - 11:24.
I love the diagrams!
One unmentioned commit management feature is `git commit --amend` which would allow you to update the last commit with new edits. If you're familiar with `git rebase -i` squashing, then this is like squashing your index into the last commit. You could also amend with the working files by using `git commit --amend -a` or providing specific files on the command line.
I think both `git stash` and `git commit --amend` have their uses, and I use them both in my workflow.
Finally, I would also like to mention that `git add -i` has a hidden feature of being able to stage individual lines of change, not complete files. If there is some debug code in your file, you can commit everything else. You can also use `git gui` to stage individual "hunks" (blocks of a diff) for commit.
Oliver Steele lives in Western Massachusetts and commutes to downtown LA, where he is bringing an operating system from handwaving to reality. He was the architect of OpenLaszlo, the author of PyWordNet and other open source projects. His interests include programming languages, knowledge representation, information visualization, and math education. [more]
I love the diagrams!
One unmentioned commit management feature is `git commit --amend` which would allow you to update the last commit with new edits. If you're familiar with `git rebase -i` squashing, then this is like squashing your index into the last commit. You could also amend with the working files by using `git commit --amend -a` or providing specific files on the command line.
I think both `git stash` and `git commit --amend` have their uses, and I use them both in my workflow.
Finally, I would also like to mention that `git add -i` has a hidden feature of being able to stage individual lines of change, not complete files. If there is some debug code in your file, you can commit everything else. You can also use `git gui` to stage individual "hunks" (blocks of a diff) for commit.
-Bart