Changes

Jump to navigation Jump to search
827 bytes added ,  17:06, 2 March 2017
summary of some git log commands
</source>
== Git Log ==What's the commit history? The [https://git-scm.com/docs/git-log man page for git log] is so big, it's a forest. There are examples in the book for [https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History viewing commit history]. For a quick cheatsheet, try these. <code>--stat</code> gives a nice view of what happened in the log.
<source lang="bash">
git log --stat
# try these other git log variatiations
git log --patch
git log -2
git log -p -2 # - p is the same as --patch
git log --pretty
git log --pretty=oneline
git log --pretty=short
git log --pretty=full
git log --pretty=fuller
git log --graph
git log --pretty=oneline --graph
git log --name-only
git log --name-status
git log --abbrev-commit
git log -S<string> # find when the number of instances of the string are added or deleted
git log -G<regex> # same with POSIX extended regex
git log -- filename # look for commits that touch filename
git log -p -- filename
</source>
4,558

edits

Navigation menu