Merge pull request #162 from dmlemos/master

Add alternative for first commit from branch
This commit is contained in:
hemanth.hm 2018-04-26 07:22:06 +05:30 committed by GitHub
commit 3853ef2829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -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

View 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>"