Changing remote path in Git

Posted on

Question :

PROBLEM:

I gave git clone to Google’s Web Starter Kit repository the project already comes with Git started and with git remote origin master set to Git default.

So, if I run the git push origin master command, Git will ask for the permission so that I can make the changes I’ve made locally to the Google account on GitHub, which I obviously do not have.

QUESTION:

How can I change this remote path so I can send the data using the git push origin master command, so I can send it to my account on Bitbucket, instead of sending it back to the source? (which in this case is the Google account on GitHub).

    

Answer :

You can either remove

git remote remove origin

add another

git remote add origin git://suaUrl

how much to change

git remote set-url origin git://suaUrl

    

Leave a Reply

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