George V. Reilly

git commit --verbose

I learned today about the -v (--verbose) flag to git commit (git-commit), which causes a unified diff of what would be committed to be appended to the end of the commit message. This diff is not part of the commit. Set the commit.verbose con­fig­u­ra­tion variable (new in Git 2.9) to adjust the default behavior.

I also learned about using git show (git-show) to display the diff for the most recent commit. I had been using git log -1 --patch (git-log). More on git log -p vs. git show vs. git diff.

blog comments powered by Disqus
Review: De Reünie (Murdered Memory) » « Review: Above Suspicion