user2572526 user2572526 - 4 months ago 25
Git Question

Resync branch deleted from a fork in Stash

I have two Stash repositories, one is a FORK of another one (PARENT).

I did a mistake and merged in the wrong branch (FORK.wrong-branch) some commits.

To fix it I decided to delete FORK.wrong-branch.

Now this branch exists only in the PARENT repository, I would like to recreate it also in my FORK, how should I proceed?

Answer Source

Pull the branch from the parent repository and push it to the fork repository. Something like this:

git fetch PARENT

git push FORK PARENT/branch:branch