My local git repo needs to pull from one server. It then needs to push a specific branch to a review repo with a different branch name on a different server.
Something like: Pull everything from PullOnlyRepo on Server1 (we'll call that origin maybe?) Push Branch hotfix to ReivewRepo with branch name JistChanges on Server2.
Right now git config -l shows:
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=<URL for Server1>
remote.origin.pushurl=no_push (this shouldn't matter since it is a pull only repo)
branch.production.remote=origin
branch.production.merge=refs/heads/production
remote.review.url=<URL for Server2>
remote.review.fetch=+refs/heads/*:refs/remotes/review/*
git pull does what I want (fetch changes from the correct place on Server1 and merges them into my work tree).
However git push doesn't. In order to achieve what I want I have to do
git push review hotfix:JistChanges
Is there some way to make git pull do this without having to put in the extra stuff?
There are some questions out there already that set up so that your local branch pushes to a remote with a different branch name. However they also change the upstream and where the pull comes from.