From 84d543db7d0555b2f4b37eab0d8bbd3780bfe20b Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Wed, 20 May 2015 00:31:53 +0700 Subject: [PATCH] Added note about checking for merged branches This should check if your commits are fully merged or not. Mostly taken from http://stackoverflow.com/questions/7548926/git-and-the-branch-x-is-not-fully-merged-error. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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