diff --git a/README.md b/README.md index 214852e..688d835 100644 --- a/README.md +++ b/README.md @@ -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 ``` ## List unpushed git commits diff --git a/tips.json b/tips.json index ea1ee54..4ecadbe 100644 --- a/tips.json +++ b/tips.json @@ -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 " }, { "title": "List unpushed git commits", "tip": "git log --branches --not --remotes",