Update cheatsheets

This commit is contained in:
ivuorinen
2024-09-01 00:19:16 +00:00
parent a05eb0e931
commit bb9d5922fa
24 changed files with 60 additions and 48 deletions

View File

@@ -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}}"`