How to see to which Github repo and existing Git repo belongs to – and then change it


You’ve just taken over a website after the 2nd service provider let the client down. Usual problem, the developer’s communication is terrible.

  1. Determine the remote original URLgit remote -v or git config –get remote.origin.url

2. Set a new remote original URL:

git remote set-url origin

3. Check your work

git remote -v

You then do:

git fetch && git pull expecting it to work. Instead you get:

fatal: refusing to merge unrelated histories


git pull –allow-unrelated-histories



git reset –hard origin/master


Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top