1

I've been using Eclipse with GIT and Gerrit for a long time but decided to give community edition of IntelliJ IDEA (12.1.3) a try. I'm able to fetch and pull changes from our repository but I can't find an option in IntelliJ where I can specify refspecs for push operations. Is there a way to do this within IntelliJ?

MrKY
  • 75
  • 1
  • 5
  • 1
    Do you want to be able to specify an absolutely custom refspec or, for instance, just the target branch? – LoKi Jun 06 '13 at 14:56
  • I need to do something like, from refs/heads/master to refs/for/master – MrKY Jun 06 '13 at 15:20

3 Answers3

1

Git Push from IDEA pushes only the current branch, and I don't think it will change in future. However, you may specify the target branch in the text field below the commits to be pushed. There is a couple of problems with usability like IDEA-98693, but hopefully they will be fixed in the next version.

LoKi
  • 3,687
  • 2
  • 23
  • 16
  • Thanks, I was thinking too much inside the box and it didn't occur to me that I could actually add refspecs inside this box. – MrKY Jun 06 '13 at 16:40
0

In PUSH dialog choose option "Push current branch to alternative branch", choose remote repository and type /refs/for/'branch' in text fields. It works in IDEA 13.0.2

0

When using IntelliJ together with Gerrit, you could use the intellij-gerrit-plugin. It also has Gerrit specific push support (refs/for target branch).

http://plugins.jetbrains.com/plugin/7272

uwolfer
  • 4,356
  • 1
  • 25
  • 40