Skip to content
Go to file
Cannot retrieve contributors at this time
27 lines (18 sloc) 524 Bytes

Add and remove remotes (like GitHub, Bitbucket and so on)

Check current remotes:

$ git remote -v

Remove one remote (for instance the one called origin):

$ git remote rm origin

Add a new remote (for instance a new one called, again, origin):

$ git remote add origin 

Finally, to set the remote as upstream and push the current branch:

$ git push --set-upstream origin master

From here on, usual git push is perfectly fine.