在使用git的时候,添加完远程地址后进行push操作的时候提示如下错误:There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream develop origin/<branch>大致的意思是:您要求从远程 'origin' 拉取,但是未指定一个分支。因为这不是当前 分支默认的远程仓库,您必须在命令行中指定一个分支名。
解决方法:找到当前项目,打开Terminal,执行 git branch -u origin/master后,就可以进行push提交。
执行上面这个操作后执行git config -l 可以发现会多出下面两个设置:
branch.master.remote=origin
branch.master.merge=refs/heads/master
本文介绍了解决在使用Git过程中遇到的特定错误:“Thereisnotrackinginformationforthecurrentbranch.”。文章提供了详细的步骤来帮助读者配置正确的分支跟踪信息,从而能够成功地将本地更改推送到远程仓库。
941

被折叠的 条评论
为什么被折叠?



