Skip to content

Instantly share code, notes, and snippets.

@edgardleal
Last active March 17, 2017 16:44
Show Gist options
  • Save edgardleal/20863a571581cb6346e974ddb7a78a1a to your computer and use it in GitHub Desktop.
Save edgardleal/20863a571581cb6346e974ddb7a78a1a to your computer and use it in GitHub Desktop.
Awesome git commands
  • Users
    • Commits by User: git shortlog -sn
  • Files
    • Files changed in a commit: git diff-tree --no-commit-id --name-only -r
  • Stats
    • Stats numbers by date: git diff --numstat "@{1 day ago}"
    • Modifications by date: git diff --stat "@{1 day ago}"
    • Log by date: git log --since 2015/12/25 --until 2016/01/26
    • Changes in a range of lines: git log -L 114,118:src/WorldController.java
    • Who modified the range of line: git blame -L 315,350 file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment