Deleted Github branch #54432
Replies: 2 comments 2 replies
-
|
If you have deleted a branch from a GitHub repository and then restored the repository, the deleted branch may not be visible in the repository anymore. However, it is possible to restore the deleted branch using Git. First, you need to find the commit hash of the last commit on the deleted branch. You can do this by running the command: This will show a list of all the recent changes to the repository, including the commit hash of the last commit on the deleted branch. Once you have the commit hash, you can recreate the deleted branch by running the command: Replace After running this command, the deleted branch should be restored and you should be able to see it in the repository. Note that if the branch was deleted a long time ago and there have been many new commits since then, it may be difficult or impossible to restore the branch, as the necessary commit history may have been lost. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, you should be able to do |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
HI, I deleted a github repository recently and I restored it. However there was a branch in the github repo that i deleted by mistake and want to restore it back. However I cannot see it.
Is there any way of getting it back?
Beta Was this translation helpful? Give feedback.
All reactions