Reputation: 171
I have a repo I cloned from the master and have made changes tp. I've been told today to start a new repo and push to that, I know I can use the following in Git Shell:
cd old repo
git remote set-url origin newurl.git
git push -u origin master
But what I don't know, due to lack of experience in teams is whether or not this changes the remote for everyone or just me. If so, how can I send my old repo and changed code to a new repo without affecting the team?
Upvotes: 2
Views: 203
Reputation: 24184
As other developers are working on old-repo
they all need to change origin
with your new repo origin
.
If you create a new-repo & send your changes to that new-repo. Other developers can clone the new-repo
or, change their origin
as like you.
Upvotes: 0
Reputation: 14456
This will just set your own remote of origin
to newurl.git
for you're local git configuration.
All this really is doing is changing the following configuration file within ./.git/config
[remote "origin"]
url = newurl.git
For more details see https://help.github.com/articles/changing-a-remote-s-url/
Upvotes: 1