git fatal: The current branch master has no upstream branch. There is no tracking information for。。。
当你在本地创建了仓库,远程也创建了仓库,或者之前和远程做了连接,或者你重装系统了,再次从远程拉取或者push代码时,就会出现如下错误:
There is no tracking information for the current branch
或者
fatal: The current branch master has no upstream branch.
不管是git push, 还是git pull --rebase, 用git remote -v发现也有关联,但也会出现以上问题,解决也很简单,都给了提示,命令如下:
git branch --set-upstream-to=origin/master master
输入以上命令就可以解决pull或push的问题了。