GIT: Branch is Not Fully Merged


There are times when you get an “not fully merged” error for a git branch, usually when trying to delete a local branch from your machine. It’s a safe bet that something in your local branch has not actually made it to the remote repository and we should do some investigating.

If you want to find out what commits have not been merged from your source branch to a target branch, use the git log command.

git log <source branch> --not <target branch>

Example Use:

git log feature/add-something-amazing --not main

If you want to know what files have changed as part of each commit, add the --stat flag.

git log feature/add-something-amazing --not main --stat