mirror of https://github.com/namibia/tips.git
Merge pull request #169 from mcsnolte/simplify-common-ancestor
Change to the simpler merge-base command
This commit is contained in:
commit
dfdfac36e0
|
@ -1080,7 +1080,7 @@ git fetch origin master:refs/remotes/origin/mymaster
|
||||||
|
|
||||||
## Find common ancestor of two branches
|
## Find common ancestor of two branches
|
||||||
```sh
|
```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
|
## List unpushed git commits
|
||||||
|
|
|
@ -445,7 +445,7 @@
|
||||||
"tip": "git fetch origin master:refs/remotes/origin/mymaster"
|
"tip": "git fetch origin master:refs/remotes/origin/mymaster"
|
||||||
}, {
|
}, {
|
||||||
"title": "Find common ancestor of two branches",
|
"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",
|
"title": "List unpushed git commits",
|
||||||
"tip": "git log --branches --not --remotes",
|
"tip": "git log --branches --not --remotes",
|
||||||
|
|
Loading…
Reference in New Issue