Mahmoud Samy
Mahmoud Samy

Reputation: 2852

How to fix github after a wrong push

My team-mate "accidentally" pushed a 2 commits to github breaking our branching model.

I want to revert my github repository as it was.

Upvotes: 1

Views: 28

Answers (1)

janos
janos

Reputation: 124648

Here you go:

git clone url project
cd project
git reset HEAD^^ --hard
git push --force

Upvotes: 2

Related Questions