Question

I am attempting to use Git-Tower with Gerrit with and am having difficulty having Git-Tower set and recognise the proper push refspec.

In our workflow we have two remotes: origin, pointed at a github repository; and review, pointed at our Gerrit code review machine. I have verified that pushing to Gerrit works from the command line with:

git push review HEAD:refs/for/develop

In Git-Tower I configure the push refspec to refs/heads/develop:refs/for/develop and have verified in the git config file that this has been set. However, when I try to push from within Git-Tower to review/develop Git-Tower attempts to push to refs/heads/develop rather than refs/for/develop, and since I am not an administrator it fails (as it should).

How should I configure either Git itself or Git-Tower specifically so I can use this workflow from within Git-Tower?

Était-ce utile?

La solution

After configuring the Push Refspec (as you already did), you shouldn't need to make any more customizations: when clicking "Push", you can leave the setting to "origin/"!

If this doesn't work out, you can get in touch with our support crew via support[at]git-tower.com.

Autres conseils

You can remove tracking from the master branch (right click the branch in the sidebar and choose "remove tracking"), that will allow the push refspec to preselect the gerrit branch. That way you don't have to switch branches after hitting push.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top