ahmedelgabri
ahmedelgabri

Reputation: 1228

Restoring a deleted Orphan remote Branch in Git?

How can I restore an Orphan remote branch that was deleted remotely & no has it anymore?

Upvotes: 1

Views: 103

Answers (2)

Samy Dindane
Samy Dindane

Reputation: 18716

There's no obvious way to do it.

Keep in mind that a branch is simply a pointer to a commit.
Thus, if someone had locally the last commit of that branch, he can do a git reflog, find the commit, and cherry-pick it where he wants.

Upvotes: 1

Zombo
Zombo

Reputation: 1

git checkout orphan_branch
git push origin orphan_branch

Upvotes: 0

Related Questions