I want to use an open source project from Github repository in my project which is placed on Atlassian Stash.
But I know that I have to do some change on that project in order to be usable in mine. Furthermore I do want to be able to add future patches of that GitHub repository to my project.
I have cloned the code to my local computer using following command:
git clone http://github.com/...
git remote set-url origin http://MY-LOCAL_STASH/...
git push origin master
set-url the URL for the
origin remote, you removed the original location, which is that of the GitHub repository. In Git, you can have many remotes, and the default name for the one you cloned from is
git remote add upstream http://github.com/... git fetch upstream
(Substitute the URL of the repo you cloned from.) Now you can do this whenever you want to update:
git fetch upstream git push origin upstream/master