In Git it is possible to create hooks. It is very helpful when you have a post-commit hook which pushs every commit to the remote. When I am using Git in cmd and commit something this is done automatically by Git. But when I do a commit with Netbeans either the hook is not executed or it doesn't work (maybe because of the username/password request?).
The best solution would be a configuration in the project properties which tells Netbeans to automatically execute a push after every commit.
This would be a great feature.
> But when I do a commit with Netbeans either the hook is not executed or it doesn't work
It does not work because we do not use commandline client but a pure java implementation of git client.
... or maybe a checkbox in the commit dialog
Is this basically the same thing as the bug at https://bugs.eclipse.org/bugs/show_bug.cgi?id=299315, or is NetBeans using another Git client?
(In reply to sskuce from comment #3)
> Is this basically the same thing as the bug at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=299315, or is NetBeans using
> another Git client?
Yes. NetBeans uses the same client as Eclipse - JGit
* eGit provides a separate button "Commit and Push".
* IDEA provides a button labeled "Commit" which acts like a dropdown. When the dropdown is opened then the actions "Commit and push", "Export as patch" are available.
*** Bug 249668 has been marked as a duplicate of this bug. ***
Any news? Need commit and push command please
(In reply to Ageinfo from comment #7)
> Any news? Need commit and push command please
Reverting back to original version 7.1.1.
@ageinfo: Do not change the version. It is the version, where the RFE first has been requested. Vote instead!
And i can't delete my previos comment in link: https://netbeans.org/bugzilla/show_bug.cgi?id=249668#c2
I find myself using TortoiseSVN instead of NetBeans just because it has a "Commit & Push".
What makes this even harder in NetBeans is that the "Push to remote" is on the third (!) level of the context menu.
I usually customize the toolbar and add "Pull Current Branch" and "Push Current Branch" to it so they are more easily accessible. But even having it easily accessible does not mean that I don't forget to push sometimes.
How difficult would it be to execute the hooks just via `bash` (or as `bat`-file on Windows)? Just like Git's command line tool itself (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).
I think this would be a more flexible way of solving this issue and gives us the whole power of `bash`/`bat`.
This behaviour maybe opt-in in the configuration (in Tools > Options > Team > Git).