Thursday, January 21, 2016

GIT - change repository to which your branch will look into, git remote set-url origin

If you want to change the ORIGIN repository for your HEAD consider to use command below, but be aware of difference the flag --update makes:

git remote set-url --update origin https://username@bitbucket.org/your_repo.git

With --update flag git PUSH will work fine, but UPDATE will still look into the former origin!

GIT - git remote show origin

In order to check to which repository looks your origin use this command:

git remote show origin

If you want to change the ORIGIN repository for your HEAD consider to use command below, but be aware of difference the flag --update makes:

git remote set-url --update origin https://username@bitbucket.org/your_repo.git

With --update flag git PUSH will work fine, but UPDATE will still look into the former origin!