Add a Git push button to the toolbar
已回答
I would like to add the button for pushing to Git, to the main toolbar in CLion, as shown with a red arrow in this screenshot.
I tried opening Menus and Toolbars in the Settings and adding the Push action to where I thought it belongs, but even after restarting CLion, the button does not appear. I would appreciate some help on this.
请先登录再写评论。
Hello!
I see that you try to add the "Push" button to Main Toolbar. This toolbar becomes visible when you choose Toolbar in the View menu. If you do this, you'll see the "Push" button on the appeared toolbar.
If you would like to add the "Push" button to the place which is marked on your screenshot, you need to add the "Push" action to Navigation Bar Toolbar.
Amazing! Thank you!
I tried this on my PyCharm IDE Community Edition, and did not work!
Not sure, but maybe what Anna proposed is not applicable to PyCharm.
Thanks anyway,
E.
@E Moravveji I tried in PyCharm Community 2018.2.4 and it worked fine on my side.
I added the "Push" action to Navigation Bar Toolbar:
And it appeared in the UI:
@Anna: Thanks for your reply. I tried with v. 2018.2.3, and still cannot see it happening.
Let me ask you this: On the first screenshot that you put there, once you choose the "Push" icon, what do you do then? I mean, on the right hand side, there are few extra buttons (e.g. Add After, Add Separator, etc). Shall I use any of them to push the "Push" button to the Nav. bar?
Thanks
@E Moravveji, you need to use "Add After" in order to add the "Push" action to to Navigation Bar Toolbar:
More info: https://www.jetbrains.com/help/clion/configuring-menus-and-toolbars.html.
I have the same problem on PyCharm 2019.1.3
I can add "push" to VcsNavBarToobarActions in the settings, but the push button does not appear in the toolbar.
Instead, the "compare with same repository version" button appears.
Also, there is no "add after" entry anymore in the toolbar settings, only a pulldown menu labeled "+" that contains "Add Action" and "Add Separator".
Frankly, I gave up on this!
@Carsten Allefeld,
>Instead, the "compare with same repository version" button appears.
I can't reproduce it. Please create an issue in the PyCharm's tracker: https://youtrack.jetbrains.com/issues/PY.
Very frustrated over the same issue on 2019.2 Community Edition.
Tried unsuccessfully to add the Push toolbar button on the Main Toolbar. According to the settings, it was added but it never appeared.
After I found this post, I removed it from the Main Toolbar settings and added it to the Navigation Bar Toolbar settings. Again, it failed appeared on the toolbar.
I then went back into the Main Toolbar settings and added it there so that it was in both Main Toolbar and Navigation Bar Toolbar.
EUREKA!
Now it appears on my toolbar!
Hello,
I wanted to do as others before, I wanted to add "Commit and Push" action to my toolbar or menu or anywhere, just please appear... but without any success. No matter how many places I try to put that action, the button doesn't appear.
I wonder what I did wrong? I opened the Settings and the Appearance & Behavior > Menus and Toolbars. Than I selected Navigation Bar Toolbar > NavBarVcsGroup > VcsNavBarToolbarActions, clicked the plus button, add action, and searched for "Commit and Push" and found the action, added a png to the icon path (which png was on my desktop because I couldn't find built-in icons), OK, but nothing happened.
Can someone help please?
Kalvin,
There is something missing from this discussion which may help you.
Does the PyCharm menu have a VCS group or a Git group?
If your menu has VCS instead of git then when you select that menu item the first sub-menu item is something like "Enable Git integration" Select that option and the main menu item VCS will be replaced with Git and the Git toolbar will appear in your toolbars.
Then make sure you have a remote specified. (From the Git menu select "Manage Remotes ...")
If you have Git integration enabled and you have a git remote specified for the project then the push toolbar button will automagically appear.
I think the documentation of this behavior is woefully inadequate and the support on this thread was not really all that great either. Hopefully this will get things working correctly for you.
Regards,
Erik W