Skip to content

Commit 56ce19a

Browse files
authored
Merge pull request git-tips#162 from dmlemos/master
Add alternative for first commit from branch
2 parents ae98df5 + 07631b4 commit 56ce19a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,13 @@ git log --all --grep='<given-text>'
984984

985985
## Get first commit in a branch (from master)
986986
```sh
987-
git log master..<branch-name> --oneline | tail -1
987+
git log --oneline master..<branch-name> | tail -1
988+
```
989+
990+
991+
__Alternatives:__
992+
```sh
993+
git log --reverse master..<branch-name> | head -6
988994
```
989995

990996
## Unstaging Staged file

0 commit comments

Comments
 (0)