我想在Git中切换分支,但是出现了这个错误信息:
error: you need to resolve your current index first
我在xcode4下使用git。git status
# On branch DateCode
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: Whereami.xcodeproj/project.xcworkspace/xcuserdatauser.xcuserdatad/UserInterfaceState.xcuserstate
#
no changes added to commit (use "git add" and/or "git commit -a")
Frappuccinos-MacBook-Pro:whereami
未合并的路径:
(使用“git reset HEAD <file>...”取消暂存)
(使用“git add/rm <file>...”标记解决方案)
- lampShadegit reset {{currentBranchName}}
然后git checkout .
将解决你的问题。 - muthukumar selvaraj