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:
parent
6c6a46ef43
commit
c333d5516f
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user