Merge pull request #169 from mcsnolte/simplify-common-ancestor

Change to the simpler merge-base command
This commit is contained in:
hemanth.hm 2019-01-20 19:22:17 +05:30 committed by GitHub
commit dfdfac36e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1080,7 +1080,7 @@ git fetch origin master:refs/remotes/origin/mymaster
## Find common ancestor of two branches
```sh
diff -u <(git rev-list --first-parent BranchA) <(git rev-list --first-parent BranchB) | sed -ne 's/^ //p' | head -1
git merge-base <branch-name> <other-branch-name>
```
## List unpushed git commits

View File

@ -445,7 +445,7 @@
"tip": "git fetch origin master:refs/remotes/origin/mymaster"
}, {
"title": "Find common ancestor of two branches",
"tip": "diff -u <(git rev-list --first-parent BranchA) <(git rev-list --first-parent BranchB) | sed -ne 's/^ //p' | head -1"
"tip": "git merge-base <branch-name> <other-branch-name>"
}, {
"title": "List unpushed git commits",
"tip": "git log --branches --not --remotes",