I used to pull down jQuery-ui by doing
git clone git://github.com/jquery/jquery-ui/
git checkout 1.8.6
This stopped working today. After I do a git clone on an empty repository, the checkout fails with:
error: You have local changes to
‘demos/spinner/currency.html’; cannot
switch branches.
Any recommendations on how to fix this? I don’t want to pull zips of 1.8.6, I want the ease of being able to switch between old and new branches of jQuery UI for testing.
You have local modifications in your working copy. Thus you can’t switch.
Either commit those changes using
git commitor reset them usinggit reset --hardSince you are getting this on git clone I suspect this may be related to your core.autocrlf setting.
Try running
git diff– If you see all lines in the file being marked as changed git is converting the line endings upon checkout.You can fix this by running
Retry the clone/checkout after setting core.autocrlf to false. This should have fixed the issue
Hope this helps.