Created
April 26, 2021 17:26
-
-
Save learnit-codeit/9a1cb0a1a6eeff0de3acb09f9881141b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Below command prints only two logs on the master branch | |
git log master -n=2 | |
or | |
git log master --max-count=2 | |
#Below command skips to print two logs on the master branch | |
git log master --skip=2 | |
#Below command prints only the last two weeks logs of master branch | |
git log master --since="2 week ago" | |
#Below command prints the logs till yesterday | |
git log master --until="yesterday" | |
#Below command prints the logs of the author Anish | |
git log --author="Anish" | |
#Below command prints the log based on the commit message | |
git log --grep="First Commit" | |
#Below command prints the log based to the changed code content | |
git log -S"abcd.log" | |
or | |
-G"foo.*" | |
#Below command prints the log order by date | |
git log --date-order | |
#Below command prints the log in reverse order | |
git log --reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment