mirror of
https://github.com/namibia/tips.git
synced 2024-11-15 17:47:12 +00:00
Add first commit from branch alternative
This commit is contained in:
parent
b773c7ab67
commit
c46d4a737e
@ -984,7 +984,13 @@ git log --all --grep='<given-text>'
|
||||
|
||||
## Get first commit in a branch (from master)
|
||||
```sh
|
||||
git log master..<branch-name> --oneline | tail -1
|
||||
git log --oneline master..<branch-name> | tail -1
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git log --reverse master..<branch-name> | head -6
|
||||
```
|
||||
|
||||
## Unstaging Staged file
|
||||
|
@ -395,7 +395,8 @@
|
||||
"tip": "git log --all --grep='<given-text>'"
|
||||
}, {
|
||||
"title": "Get first commit in a branch (from master)",
|
||||
"tip": "git log master..<branch-name> --oneline | tail -1"
|
||||
"tip": "git log --oneline master..<branch-name> | tail -1",
|
||||
"alternatives": ["git log --reverse master..<branch-name> | head -6"]
|
||||
}, {
|
||||
"title": "Unstaging Staged file",
|
||||
"tip": "git reset HEAD <file-name>"
|
||||
|
Loading…
Reference in New Issue
Block a user