git 本地分支和远程分支的跟踪信息的对应
git,如果在在本地自己建了一个分支feature/wap,然后远程也有一个分支feature/wap,这时候如果tracking追踪信息没有对应上,是不能提交的,必须将本地分支和远程分支对应上,才能正常提交
例如有如下包错:
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 feature/wap origin/<branch>
这个时候git会友好的提示你怎么做:
解决方法:
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream feature/wap origin/<branch>
这个就可以建立本地分支与远程分支的对应关系