diff --git a/README.md b/README.md index cc1f12c..0e8b9e0 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ For clarity's sake all examples in this document use a customized bash prompt in - [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit) - [Delete tag](#delete-tag) - [Deleted Patch](#deleted-patch) + - [Check if all commits on a branch are merged](#check-if-all-commits-on-a-branch-are-merged) - [Other Resources](#other-resources) - [Books](#books) - [Tutorials](#tutorials) @@ -650,6 +651,21 @@ If someone has sent you a pull request on GitHub, but then deleted their origina After commiting, change the author of the previous commit. To do this, see how to [change author](#commit-wrong-author). Then, apply whatever changes needed on to, and make a new pull request. + +## Check if all commits on a branch are merged + +To check if all commits on a branch are merged into another branch, you should diff between the heads (or any commits) of those branches: + +```sh +(master)$ git log --graph --left-right --cherry-pick --oneline HEAD...feature/120-on-scroll +``` + +This will tell you if any commits are in one but not the other, and will give you a list of any nonshared between the branches. Another option is to do this: + +```sh +(master)$ git log master ^feature/120-on-scroll --no-merges +``` + # Other Resources ## Books