本文介绍了在Bitbucket(git)上从远程恢复已删除的分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想恢复从Bitbucket上的远程共享存储库中删除的分支。
我知道 reflog 是使用本地存储库的方法。



我如何得到实现这一点在远程?

解决方案

四年后...

我遇到了这个答案,因为我通过bitbucket.org UI删除了一个团队成员希望恢复的分支。



我发现 git branch --remote 显示了所有原始分支,甚至是那些通过UI。

我用 git checkout origin /< branch_name> -b > ,然后执行 git push -u origin< branch_name> ,然后再次显示在用户界面中。

I want to recover a branch that was deleted from our remote shared repository on Bitbucket.I know that reflog is the way to go with local repositories.

How would I got about achieving this on the remote one?

解决方案

Four years later...

I came across this answer because I deleted a branch through the bitbucket.org UI that a team member wanted restored.

I discovered that git branch --remote shows all the branches on origin, even the ones that are deleted through the UI.

I checked out the origin branch locally with git checkout origin/<branch_name> -b <branch_name>, then did git push -u origin <branch_name> and it showed up in the UI again.

这篇关于在Bitbucket(git)上从远程恢复已删除的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:05