Changing git master after cloning

If you’ve cloned a GitHub repository from the original one and not from your forked version and you would like to change it, you can just edit the .git/config file in your project and change the URL of the origin remote:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*

Simple, easy, and most importantly – it works.