Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post Posted: October 18th, 2017, 4:02 pm 
 

Joined: September 27th, 2017, 7:30 am
Posts: 6
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.


Top 
 Profile  
Reply with quote  
 Post Posted: October 18th, 2017, 10:08 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2828
Location: Oklahoma, United States
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


Top 
 Profile  
Reply with quote  
 Post Posted: October 19th, 2017, 1:55 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3470
Location: Japan
Yeh, if you have changes, commit them, or undo them, as necessary. Then you can freely switch branches.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: October 19th, 2017, 4:24 pm 
 

Joined: September 27th, 2017, 7:30 am
Posts: 6
chili wrote:
Yeh, if you have changes, commit them, or undo them, as necessary. Then you can freely switch branches.

The problem is that I did not change anything.


Top 
 Profile  
Reply with quote  
 Post Posted: October 19th, 2017, 5:58 pm 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2828
Location: Oklahoma, United States
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.

_________________
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


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 5 posts ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: