Git “error: The branch ‘x’ is not fully merged”

Here are the commands I used from the master branch

git branch experiment
git checkout experiment

Then I made some changes to my files, committed the changes, and pushed the new branch to GitHub.

git commit . -m 'changed files'
git push -u origin experiment

Later on I decided to merge my experiment branch into the master branch.

git checkout master
git merge experiment

Finally I pushed the changes to GitHub.

git push -u origin master

All went well until I tried deleting my experiment branch using

git branch -d experiment

I got the error message:

error: The branch ‘experiment’ is not fully merged.
If you are sure you want to delete it, run ‘git branch -D experiment’.

I’m a bit new to git, and I don’t know how much more I could possibly merge the two branches. What am I missing here?

12 Answers
12

Leave a Comment