robster robster - 1 year ago 88
Git Question

After GIT merge I still have the old branches

I am sorry if this seems simple to some but I'm still getting my head around GIT. I thought all was fine. I'd create a branch, make edits, then merge back into master.

Then the other day I checked and there are still two old branches there. I tried to merge them again, but after merge I still see them. I've spent some time trying to figure this out but can't. Here they are, still active:

enter image description here

In the Merge tool it says "no commits differ" for both of these branches.
enter image description here

Can anyone offer any ideas as to why they are still there and how to properly merge them (or not have them show up anymore)? I'm worried I may lose work if I continue before resolving this.

Answer Source

After you merge a branch the branch doesn't get deleted. You have to do that manually:

git branch -d my_branch_name

If the branch hasn't been merged it will prompt you to use -D instead of -d.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download