I can't figure out how to make SourceTree push to Gerrit.
I saw this link but I still don't understand how it can be done: https://answers.atlassian.com/questions/29361/configuring-sourcetree-push-for-gerrit
Apparently according to the release notes for 1.3.3 there is a way to do it but I can't figure it out: http://www.sourcetreeapp.com/update/ReleaseNotes.html#version-1.3.3
Is there a step by step guide somewhere as to how to do it?
Right now I run this command on the terminal to push
git push origin HEAD:refs/for/master
I believe the answer provided by atlassian says to change the name of the remote branch when you see the Push dialog.
This appears to have properly pushed the commits into Gerrit for me. The problem I have now is that the 'refs/for/master' value doesn't persist. Now to figure that out. I will update this post once I've figured that out. Hope this helps even tho it's late to the game.
Update: it turns out that you need to add a push entry under remote origin in the .git/config. You should do this via the git config command (tho i did edit the file manually i'm sure that's bad practice). the push line i wrote is:
push = refs/heads/*:refs/for/*
for clarity here is my remote origin entry in .git/config:
[remote "origin"]
url = ssh://gerrit-test.example.com:29418/mystuff.git
fetch = +refs/heads/*:refs/remotes/origin/*
push = refs/heads/*:refs/for/*
In SourceTree you can now push and it will push to gerrit instead of the final repo. ( you can now also just do git push without specifying anything else and it will push to gerrit ). Note that after a push, SourceTree will still show a number on the Push button that says you still have stuff to push. This is because it is still fetching from the master repo and the changes you've pushed into gerrit have not yet been merged into the master repo. Once your changes have been merged into the master repo the number on the Push button will disappear.