有人不小心删除了我的团队中的alpha分支。如何恢复远程分支git?
我有远程分支的起源/阿尔法。我无法使用git ls-remote找到这个origin/alpha分支。
我知道最后一次我提交的是原始/ alpha分支上的XYZ。我有那个分支的SHA。
我想创建一个使用此SHA的新分支。我用git checkout 45430f8834b0ebda6e89668cc4a4ba3f6a2067a4。
后,我试图用git结账退房新的分支B [NEW_BRANCH]
我想与git拉这个分支。但我得到以下错误
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> alpha_recovered
任何想法,我怎么能恢复我的远程分支,我不能够在git的LS-远程看到的。
你或者运行'首先git的结帐-b',或名称分支'git的branch'。 – 0andriy
我已经命名它,但命名后...如果我做混帐拉我得到以下错误。 – Samir
是的,你必须将你的本地分支链接到远程分支。引用文字的最后一行显示您需要的内容。 – 0andriy