Git: Untracked working tree file would be overwritten by merge

I ran into a merge conflict when a branch had changed a file and I was merging in another branch where the file had been deleted and placed in gitignore.   Some suggestions on handling this here:

I used:

  • git checkout <your-branch> -f

I then need to “git rm” the file in the branch where it had been modified.  I’m not sure what exactly happened to the file since I didn’t care much about it.

Leave a Reply

Your email address will not be published. Required fields are marked *