Rebuild remote git branch from Phabricator version

I have an open revision of a factory and I accidentally deleted the base git branch. I can get the diff from the revision and recreate the branch.

But is there a way to restore a deleted branch from a revision?

+3


source to share


2 answers


You can use arc patch

to create a branch. It will create a branch named arcpatch-D###

where D ### is your Diff id. Once you have this branch, you can use git commands to create a new branch based on the head of that branch and name it whatever you like.

Recommended steps: 1.2 arc patch D###

.git checkout -b new-branch-name



From there, you can do anything else that you like.

+5


source


If you have access to the underlying git repo, you can simply use git reflog

: you will see the commit referenced by the remote branch.



See, for example, " How do I check in a remote branch in git? "

+2


source







All Articles