mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-15 08:48:43 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/git-log
12
tldr/git-log
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show the history of a particular file or directory, including differences:
|
||||
|
||||
`git log -p {{path/to/file_or_directory}}`
|
||||
`git log {{--patch|-p|-u}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Show an overview of which file(s) changed in each commit:
|
||||
|
||||
@@ -28,14 +28,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git log --oneline --decorate --all --graph`
|
||||
|
||||
- Show only commits whose messages include a given string (case-insensitively):
|
||||
- Show only commits with messages that include a specific string, ignoring case:
|
||||
|
||||
`git log -i --grep {{search_string}}`
|
||||
`git log {{--regexp-ignore-case|-i}} --grep {{search_string}}`
|
||||
|
||||
- Show the last N commits from a certain author:
|
||||
- Show the last N number of commits from a certain author:
|
||||
|
||||
`git log -n {{number}} --author={{author}}`
|
||||
`git log {{--max-count|-n} {{number}} --author "{{author}}"`
|
||||
|
||||
- Show commits between two dates (yyyy-mm-dd):
|
||||
|
||||
`git log --before="{{2017-01-29}}" --after="{{2017-01-17}}"`
|
||||
`git log --before "{{2017-01-29}}" --after "{{2017-01-17}}"`
|
||||
|
||||
Reference in New Issue
Block a user