Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthewmccullough/2579381 to your computer and use it in GitHub Desktop.
Save matthewmccullough/2579381 to your computer and use it in GitHub Desktop.
Notes from GitHub Free Git Class on 2012-05-02

Git Commands from the 2012-05-02 Office Hours

Finding Things In Git

Other Free Events

http://github.com/training/free

Slides

http://speakerdeck.com/u/matthewmccullough/p/finding-things-in-git

Command History

z git_git
git log
git help log

git log -p
git log -SDEF_VER
git log -SDEF_VER -p

git log -G '.*ver.*' -p -100
git help log

git log 
git log --author="Junio"
git log --pretty=fuller
git log --author="Junio" --committer="Martin"
git log --author="Martin" --committer="Junio"
git log --author="Martin" --committer="Junio" --pretty=fuller

git log -- hex.c
git log --stat -- hex.c

git log --stat -- Documentation/
git log --stat -- help.c help.h
git log --pretty=oneline -- rerere.c
git log --follow --pretty=oneline -- rerere.c
git log --name-status
git log --name-status --diff-filter=A
git log --name-status --diff-filter=D
git log --name-status --diff-filter=AD
git log --name-status --diff-filter=AM
git log --name-status --diff-filter=AM --author="Junio"
git log --name-status --diff-filter=AM --author="Junio" -- Documentation/

git log --grep '.*mistake.*'

git log --pretty=oneline --since=1.month.ago --before=2.weeks.ago
git log --pretty=oneline --since=1.month.ago

git log --since='1.month.ago'

git --no-pager log --since='1.month.ago'
git --no-pager log --since='1.month.ago' --before='2.weeks.ago'
git --no-pager log --not --since='1.month.ago'
git --no-pager log --not --author="Junio"

git blame rerere.c
more rerere.c
git blame rerere.c
git blame -C rerere.c
git blame rerere.c
git config --get-regexp 'alias*'
git clean -ndX
git help clean
git orphank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment