【发布时间】:2011-08-25 13:19:01
【问题描述】:
我正在尝试在 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
【问题讨论】:
-
# Unmerged paths: # (use "git reset HEAD
..." to unstage) # (use "git add/rm ..." 酌情标记分辨率) # -
请编辑您的问题以粘贴该信息,它在 cmets 中不可读。
-
git reset {{currentBranchName}}然后git checkout .会解决你的问题 -
这能回答你的问题吗? Git merge errors