Git with Visual Studio
Common Issue with Git Visual Studio
Merge or Commit error
If you're using Visual Studio Git.Merge code from source branch to target branch and there's new commit at target branch, you might see following error.
An error occurred. Detailed message: 2 uncommitted changes would be overwritten by merge
You'll probably still see this error after try couple time pull operation from target branch. I think this might be a bug for using Visual Studio git, but some people saying it might be file be locked, anyway it is something should working but git VS is not doing correctly. So following are the fix I have tried and works so far.
- After check out to target branch always pull first then do other operation like merge or push.
- #1 although most of the time should work fine, however, if you forgot to pull or even after you pull someone to push their you might still see above error.
- Restart Visual Studio, this might works
Open command line from your current source folder and type
git status git pull