Git - Merge Conflict
Go to solution
Solved by DevBlox,
Usually this happens when the file was changed on master and on the child, then an attempted merge. Could be that some silly change, like a space automatically removed, that snuck in to a commit on master (tends to happen if you use git add --all regularly), that child is not basing itself on. Now that the merge conflict is active you are in merging mode. Two ways to fix it right now:
- Just solve the conflict and finish the merge. Remove the symbols (it shows you two possible options, local and incoming, you get to choose what you want), leave the changes you want to be in final merge, save. Then git add the file and git commit, you'll then have a merge commit, you're done.
- If you don't want that on the master branch (some people/teams don't like having unclean merges in master, it is dangerous sometimes), abort the merge with git merge --abort. Then you checkout your child branch, and merge master into the child branch, this will merge the changes that child is not based on. Likely will cause a conflict, since your commits are there already. Solve it like the other case, get that merge commit. Then you will be able to do a clean merge to master.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now