出现场景:第一次clone下远端代码,修改操作后进行push,提示本地分支和远端分支没有关联,大概提示信息如下:
git branch --set-upstream-to=origin/feature-liui feature-liuiThere is no tracking information for the current branch.
Please specify which branch you want to merge with.
跟同事请教,使用该命令:
git branch --set-upstream-to=origin/branch
利用此命令和远端仓库对应的分支进行关联,此后就可以对远端对应的分支进行git push和git pull操作