Reputation: 203
I was working in a prior project where, if I tried to change branches locally without committing my changes first, would error and insist I do that first. However, the current project I'm working in lets my change branches without committing changes, which is more dangerous of course (checking code into the wrong branch).
I'm trying to figure out if this is a policy in Azure Dev Ops that was set in my one project, that isn't in this new one. I didn't see a Visual Studio (2017) answer to this, but perhaps I'm missing something.
Upvotes: 0
Views: 181
Reputation: 59065
Both behaviors are standard, correct Git behaviors that have nothing to do with either Visual Studio or Azure DevOps.
If you have changes to a file and the file isn't different between branches, you can freely switch branches.
If you have changes to a file and the file is different, it complains that you have to either undo the changes, stash them, or commit them.
Upvotes: 1