Skip to content

Commit 1a2a7f2

Browse files
committed
added steps for viewing commit histories
1 parent 7aacd59 commit 1a2a7f2

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

‎README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,25 @@ To restore changes to a file use
7272
> git restore <file-name\>
7373
7474
To unstage a file use
75-
> git restore --staged <file-name\>
75+
> git restore --staged <file-name\>
76+
77+
To view the history of your commits use
78+
> git log
79+
80+
To view commits history with shorter identifiers use
81+
> git log --abbrev-commit
82+
83+
To view your commits history in different configuration
84+
> git log --oneline --graph --decorate
85+
86+
To view commits history between specific commits use
87+
> git log <commit-name-1\> <commit-name-2\>
88+
89+
To perform date based search on commits use
90+
> git log --since="3 days ago"
91+
92+
To view commit history for a particular file use
93+
> git log -- <file-name\>
94+
95+
To go through the renames for a specific file us
96+
> git log --follow -- <path-to-file\>

0 commit comments

Comments
 (0)