Search code examples
githubgithub-for-mac

Messed up my master branch on Github


While contributing to a github project that I had folked. I committed my changes to the master branch of my repo. By mistake I did a pull from the Project's repo. Now while I do a PR from my repo, it includes those changes too. I dont want that to happen, can anyone help?


Solution

  • Just reset your local master and push it back.

    $ git checkout master
    $ git reset <last_good_commit>
    $ git push