There is a Git branch which was deleted by GitLab when closing a merge request. I would like to restore (undelete) that branch; however, I'm not seeing an option in the UI to do so.
In GitHub it is possible to restore a branch deleted by a pull request after the fact (via the "Restore branch" button on the pull request). I'm wondering if GitLab has an analogous feature for closed merge requests.
I can of course do this manually through the Git command line, checking out the last commit hash for the deleted branch, and pushing it back up to the deleted branch name. However, I would rather use the UI for something like this if it exists.
How can I restore a branch which GitLab deleted when closing a merge request?
Restoring a deleted branch is an open issue, so GitLab has not implemented this feature at the time of this writing.
However, if you know the commit ID (and it hasn't been pruned), you can create a new branch from that commit: