I have one repo in github which is public, there I have an Open source application i'm working on that is for making product catalogs, and small cms content.
I also have a private repository (not hosted in github) which is an application developed under the open source application hosted in github.
Since I'm currently working on both applications, adding features in the open source one and also making changes in the private one like changing the template and also pulling the code from the open source one.
I was wondering if there is any way in which I could pull the new stuff from the open source one but also pushing the code of the new application to the other repo.
Set a push URL for the remote that is different from the pull URL:
This changes the
remote.name.pushurl
configuration setting. Thengit pull
will pull from the original clone URL butgit push
will push to the other.In old Git versions,
git remote set-url
did not have the--push
switch. Without it, you have to do this by changing the configuration setting manually:git pull private master
andgit push github master
pulls from your private repo (given it's named like that) and pushes to github (might also be calledorigin
). It's not SVN ;-)