1

I merged a branch in master a few days ago. I didn't make any changes in the branch, but when I tried to delete it today with git branch -d branch_name it said the branch isn't fully merged in.

I got curious and did a gitg and saw that there was a stash in the branch. So I thought may be that stash is causing that behavior. I deleted the stash. But still I get the same error.

Doing a git status doesn't show any changes.

I can delete the branch using git branch -D branch_name.

  1. Why isn't -d working?
  2. How can I see what is not merged in? (gitg doesn't show anything.)
apaderno
  • 28,547
  • 16
  • 75
  • 90
navderm
  • 799
  • 2
  • 11
  • 33
  • 1
    please post a log excerpt, something like `git log --oneline --graph --decorate master `, and post the part from just before the merge you mentioned – Nevik Rehnel Jun 04 '13 at 15:28
  • Looks like a duplicate of: http://stackoverflow.com/questions/7548926/git-and-the-branch-x-is-not-fully-merged-error – Mike D Jun 04 '13 at 15:31
  • 1
    What's the result of `git log ..branch_name`? – gcbenison Jun 04 '13 at 15:34
  • I was about to post what @gcbenison just posted. That command will tell you commits are unique to that lineage. – TheBuzzSaw Jun 04 '13 at 15:40

1 Answers1

2

It means that you have commits on the branch that you are trying to delete that are not in the branch that you are currently one.

git diff <branch you are one> <branch you are deleting>

should show what is not merged in (in diff format).

As this answer says doing git branch --contains branch-to-delete should show the commits that are not merged.

Community
  • 1
  • 1
Schleis
  • 41,516
  • 7
  • 68
  • 87