Why can I not switch branches?

后端 未结 7 1075
故里飘歌
故里飘歌 2020-12-13 23:29

I\'m trying to switch branches in git but I\'m getting this error message:

error: you need to resolve your current index first

I\'m using g

7条回答
  •  情歌与酒
    2020-12-13 23:55

    I got this message when updating new files from remote and index got out of whack. Tried to fix the index, but resolving via Xcode 4.5, GitHub.app (103), and GitX.app (0.7.1) failed. So, I did this:

    git commit -a -m "your commit message here"
    

    which worked in bypassing the git index.

    Two blog posts that helped me understand about Git and Xcode are:

  • Ray Wenderlich on Xcode 4.5 and
  • Oliver Steele from 2008

提交回复
热议问题