[All of these actions were performed with Visual Studio 2019, although the question really pertains to Git and Git Stash.]
I have a generic question about Git:
- I had a clean clone of master with no file changes.
- From master, I created then checked out a branch called Temp.
- I changed 5 files in the Temp branch.
I then needed to switch back to master to check something... When I tried to switch to master in Visual Studio, I was offered the opportunity to stash my changes. I stashed then ended up back in the master branch. However, Visual Studio reported that Git detected merge conflicts that would need to be resolved. I do not understand how this could happen!
Furthermore, I tried immediately to switch back to the Temp branch, and Visual Studio reported that I need to resolve merge conflicts before I can leave the master branch.
An important word here: The folder I'm working on has several project folders, each with its own .git repo. However, I changed files only in one of those project folders--all other folders had only unchanged files.
My question is this: What would be the reason why I would have a merge conflict with any file upon stashing then switching from the temp branch back to master given the condition of my files as itemized above in the bulleted list? I would think I could just stash, switch to master without fuss, then pop (unstash) when once again checking out the Temp branch...
Thoughts?