Git: There is no tracking information for the current branch.

短命女 2022-05-28 03:59 249阅读 0赞

在执行git pull的时候,提示当前branch没有跟踪信息:

  1. git pull
  2. There is no tracking information for the current branch.
  3. Please specify which branch you want to merge with.

对于这种情况有两种解决办法,就比如说要操作master吧,一种是直接指定远程master:

  1. git pull origin master

另外一种方法就是先指定本地master到远程的master,然后再去pull:

  1. git branch --set-upstream-to=origin/master master
  2. git pull

这样就不会再出现“There is no tracking information for the current branch”这样的提示了。

发表评论

表情:
评论列表 (有 0 条评论,249人围观)

还没有评论,来说两句吧...

相关阅读