因此,我对Git / Bitbucket的了解不多,但是我不确定到底是什么。也许有点超出我的深度。
我有一个项目已经休眠了一年,并且以某种方式失去了与Bitbucket的联系。如何将现有的远程源重新分配给本地存储库?
我做了一个本地git commit(工作正常),但是当我git pull
在推送之前做的时候,我得到了:
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-to=origin/<branch> master
我试过:
git branch --set-upstream-to=origin/[email protected]:<username>/<repo>.git master
...那没用。我懂了:
error: the requested upstream branch 'origin/[email protected]:<username>/<repo>.git' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
我知道我有该项目的BitBucket存储库(在我的浏览器中访问BitBucket可以确认这一点),并且项目状态仅落后于一个提交。
提前致谢。
代替
git branch --set-upstream-to=origin/[email protected]:<username>/<repo>.git master
尝试使用
git branch --set-upstream-to=origin/master master
然后,运行git fetch
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句