git - GitHub remote removed from repo after using set-url -


i want use open source project github repository in project placed on atlassian stash. know have change on project in order usable in mine. furthermore want able add future patches of github repository project. have cloned code local computer using following command:

git clone http://github.com/... 

after added code stash using following command:

git remote set-url origin http://my-local_stash/... git push origin master 

after doing code placed on server , github git trackers removed git itself. have solution problem?

when set-url url origin remote, removed original location, of github repository. in git, can have many remotes, , default name 1 cloned origin.

you should add remote (i call upstream) , point github. update copy of code in stash, you'll pull upstream push origin. run this:

git remote add upstream http://github.com/... git fetch upstream 

(substitute url of repo cloned from.) can whenever want update:

git fetch upstream git push origin upstream/master 

Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -