1
0
mirror of https://github.com/namibia/tips.git synced 2024-11-16 01:57:16 +00:00

Change to the simpler merge-base command

Good to showcase this command as it also provides additional features
like --fork-point and --all.
This commit is contained in:
Steve Nolte 2019-01-18 10:34:23 -06:00
parent 6c6a46ef43
commit c333d5516f
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",