Git: Recover the deleted remote branch

git, github

Solution

Do you still have the local copy with you? Run `git branch` to check, you probably still have your local branch there since you don't mention removing the local branch.

If this is this case, just push to the remote repository again, with `git push dev test` without the colon.

Problem

well, I've made a very terrible mistake which first I just want to delete the remote connection to another repositories. I've made the command like this: git push dev :test which after I check on the github, I'm just realize that the branch test already deleted. Question: how can I get the branch back? Is it possible to undo the command which I've already made?

Original source

Related problems