0

On a shared feature branch, I've checked out the branch and inadvertently rebased it to master, causing a slew of problems as it's a shared branch and I should have done git merge.

How can I revert this entire branch to be exactly the state of the branch in the repository?

0

1 Answer 1

1

If you have done it only locally you can switch to branch master, delete your local feature branch and checkout the remote branch gain:

git checkout master
git branch -d featurebranch
git fetch
git checkout -b featurebranch origin/featurebranch

Not the answer you're looking for? Browse other questions tagged or ask your own question.