Fatal Git error when switching branch

Error message:

fatal: git checkout: updating paths is incompatible with switching branches/forcing

How to get past this Git checkout error?


By explicitly specifying “ git checkout HEAD $blah ” instead of just saying “ git checkout $blah ”, assuming you did want to check out a file.

You don't say what you were trying nor what you typed, however, so no one can give you anything but a blind guess.


When I encounter this message, it is because I have tried to do git checkout -f $blah , expecting to throw away local changes, as described in git checkout --help .

Instead, I use rm $blah && git checkout $blah to throw away local changes.

链接地址: http://www.djcxy.com/p/22450.html

上一篇: Gud插件Hudson签出问题

下一篇: 切换分支时发生致命Git错误