Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change origin in a SourceTree

I need to change origin for existing git repository. I am using SourceTree. I search a lot but has not fined the answer. Thanks!

like image 674
Daria Avatar asked Nov 03 '15 14:11

Daria


2 Answers

Using Source Tree we can change the origin of our repository from the Settings option:

enter image description here

Edit the origin and save it

enter image description here

like image 137
Jorgesys Avatar answered Nov 07 '22 15:11

Jorgesys


  1. First you have to add a new remote through 'Repository' -> 'Repository Settings...' -> 'Add' (Changing remote repository)
  2. Stay in the 'Repository Settings' menu and edit the current origin. Uncheck the 'Default remote' checkbox and rename the remote (e.g. old_origin).
  3. Now edit the new remote that was added in step 1 and check the 'Default remote' checkbox, the remote will be automatically named to origin.
like image 21
Synck Avatar answered Nov 07 '22 13:11

Synck