Git Error: "error: The following untracked working tree files would be overwritten by merge"

Question: I am trying to merge a Branch into another Branch using Git Command but receiving the error "error: The following untracked working tree files would be overwritten by merge. Please move or remove them before you merge".

My question is how do you remove the content in the folder that is causing Merge Issues in Git?


Please Login to see the rest of the answer

Answer: One way I resolved this error is by copying the content of the Master Branch (except .git and .vs folders) and pasting them in another folder for backup. Then type git merge YourBranchHere 
This will bring all your files from YourBranchHere onto the Master Branch, basically clean or overriding every content file on Master with content file on YourBranchHere.

I hope this helps you.


Write an Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy