gerrit-intellij-plugin
gerrit-intellij-plugin copied to clipboard
Cannot Push to HEAD
I could not find a way to push to HEAD:refs/for/master it only offers the option to push to :refs/for/master
@lssilva: Why do you need this option? Does :refs/for/master not work for you?
@uwolfer, I'm getting the 'Push Rejected' message for the reason mentioned by @lssilva, so it forces me to use the git bash for 'push origin HEAD:refs/for/master'.
Can you please provide the full (anonymized) error which you can find in IntelliJ "Version Control"-tab log?
@Suavac / @lssilva: Please see my question above. Any feedback would be appreciated. Thanks.
only refs won't work for my current project I need to push git push origin HEAD:refs/for/rel-2.3.X git push origin HEAD:refs/for/rmaster
That is just how the project is setup and I have no access to change it.
@lssilva: Can you please provide the full (anonymized) error which you can find in IntelliJ "Version Control"-tab log?
I don't think there is a error it is just not possible to add HEAD anywhere
@lssilva: Ah, I thought you get the same error as @Suavac when you try to push to refs/for/... (without HEAD).
http://stackoverflow.com/questions/10461214/why-is-git-push-gerrit-headrefs-for-master-used-instead-of-git-push-origin-mast A more detailed discussion here
@lssilva: Sure, "refs/for/.." is required in order to push to Gerrit. I'm just not sure why "HEAD" is absolutely required in your case.
@Suavac: Can you please provide the full (anonymized) error which you can find in IntelliJ "Version Control"-tab "log" when you get the "push rejected" error?
@uwolfer I just tried to do it to get you a log. In the git push view I replaced master with my URL
HEAD:refs/for/master and I got a pop-up Invalid destination branch name: HEAD:refs/for/master I have a screenshot but cannot attach here.
On command line I use
git push origin HEAD:refs/for/master
Seems the validation in the plugin is not accurate.
@lssilva: You can attach screenshots here - just drag it into the comment field.
@lssilva: What version of IntelliJ are you using?
Do you have enabled the option "Push to Gerrit" in the push dialog? When exactly does this message pop up?
I see same issue. All I can see in IntelliJ log is - 2:43:29 PM Push rejected: Push to origin/refs/for/master was rejected
I"m using Gerrit 2.12.2 and Plugin version 0.9.8.1-142. As stated in this thread, I can push the changes to gerrit for review as git push origin HEAD:refs/for/master
I'm having the same issue with Gerrit 2.12 and Plugin version 0.9.9.1-142.
@uwolfer I found out that I'm getting this error initially for the lack of change-id in my commits. Is there a way for the plugin to add change id by automatically adding the hook and amending commits? (asking because git review CLI tool is able to that)
After manually adding the change id, it worked for me.
@tunix: No, it is not possible to add change ids after committing automatically with the plugin. If you'd like this feature, you can open a feature request for it.
Same thing with me. I want to add HEAD as HEAD:refs/for/"Branch Name", but it doesn't allow me to add and I can not push my commit
Hi, please somebody explain me how to use this plugin properly. I have a Linux machine with installed Gerrit on it and i want to manage my code review from Intelij IDE, which runs on the local Windows machine. I have already gerrit plugin installed on my intelij and i connected to gerrit server, but when i'm pushing the commits with gerrit options, the commits are never getting the gerrit server, despite i'm getting sometimes the message "pushed successfully". What is wrong?
@Etesyolk: You can see details about your push in Version Control -> Log
tool window. If this still does not help, please open a new issue here on GitHub.