tortoisegit提示pull requires the selected local branch to be the current branch

刚用tortoisegit,就碰到这坑爹问题。

问题,提交代码提示pull requires the selected local branch to be the current branch,如图

tortoisegit提示pull requires the selected local branch to be the current branch

以为需要先pull一下,然后pull,又错了。

tortoisegit提示pull requires the selected local branch to be the current branch

问题原因其实就是分支的问题(为什么会出现,鬼才知道)

解决:(没法儿截图,就口述了)

1.到项目根目录下,右键tortoisegit,选择switch/checkout,选择master,OK。如果需要提交到远程仓库就选择

tortoisegit提示pull requires the selected local branch to be the current branch

2.切换成功后,先pull一下

tortoisegit提示pull requires the selected local branch to be the current branch

3,更新完就可以直接提交了。但是,pull的时候如果有冲突,直接 stash save一下,更新完再恢复下就行了。

bingo,提交成功。以上是本次踩坑经历,如果错误,本人一概不负责。哈哈哈哈。