Hi,
I have a problem:
If I want to switch between two branches I am getting an error saying:
'Cannot switch to T17-dev because there are uncommitted changes. Commit or undo your changes before you switch branches. See the Output window for details.'
Why?
Note that I am also getting this message when I am opening VS and trying to start working in a branch.
Thanks.
problem with changing branches
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: problem with changing branches
You must go to the Changes tab, write a commit message and commit before switching branches. If it allowed you to switch before committing, your changes would be lost. Compiling the chili framework for instance would cause .shh files to be created and git will try tracking those added files as changes, so then you must commit the changes before switching.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: problem with changing branches
Yeh, if you have changes, commit them, or undo them, as necessary. Then you can freely switch branches.
Chili
Re: problem with changing branches
The problem is that I did not change anything.chili wrote:Yeh, if you have changes, commit them, or undo them, as necessary. Then you can freely switch branches.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: problem with changing branches
Did you check the Changes tab in Team Explorer?
To be fair, there have been times that VS says there are changes to commit but the changes tab is empty. The only way I've been able to fix this is with a third party git program ( could also use the git commands or the git gui ). I don't know the commands and I don't use Git Gui, I use TortoiseGit ( thanks Luis or maybe it was Cameron ) when VS git breaks.
To be fair, there have been times that VS says there are changes to commit but the changes tab is empty. The only way I've been able to fix this is with a third party git program ( could also use the git commands or the git gui ). I don't know the commands and I don't use Git Gui, I use TortoiseGit ( thanks Luis or maybe it was Cameron ) when VS git breaks.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com