Without the stash functionality it is very hard to work with Git based projects with several branches.
- I am in the middle of a development on BRANCH_A and I get a request to fix something in BRANCH_B
- I cannot easily switch to BRANCH_B without a lot of hassle to save uncommited changes somewhere and then restoring on them onto my working copy after I can start working on BRANCH_A again (after finished work with BRANCH_B).
There is an "Export > Uncommited Changes" function but there is no way on the GUI to restore the created patch.
The only workaround now is to manually stash the changes from the command line and re-apply it after I could switch back to BRANCH_A
This is doable now from the built-in terminal but it is not nice and not comfortable.
Stashing is a very integral part of Git so it should be supported correctly in Netbeans.
did you try main menu/team/shelve changes?
> There is an "Export > Uncommited Changes" function but there is no way on the
> GUI to restore the created patch.
to apply a patch go for main menu/tools/apply diff patch (In reply to comment #0)
In my installation (7.2.1, Linux Mint Nadia, x64), the "Shelve Changes" menu item is not visible when I select a Git project (a Maven project but I suppose that doesn't matter).
If I select an SVN project in Projects, the Shelve Changes menu item is visible and seem to be working.
(In reply to comment #2)
> In my installation (7.2.1, Linux Mint Nadia, x64), the "Shelve Changes" menu
> item is not visible when I select a Git project (a Maven project but I suppose
> that doesn't matter).
True, Shelve Changes is not supported in Git. I'll take a look at it in the next release - bug #225057
+1 to this. Would dramatically improve the usefulness of Git with NetBeans.
*** Bug 230414 has been marked as a duplicate of this bug. ***
(In reply to comment #3)
> True, Shelve Changes is not supported in Git. I'll take a look at it in the
> next release - bug #225057
@Ondrej: Shelve changes is solved in bug #225057. So this issue can be resolved as fixed too?
(In reply to comment #6)
> (In reply to comment #3)
> > True, Shelve Changes is not supported in Git. I'll take a look at it in the
> > next release - bug #225057
> @Ondrej: Shelve changes is solved in bug #225057. So this issue can be resolved
> as fixed too?
I don't think so.
Shelves is an specific feature from NetBeans. It would be better an integration with git stashes.
I am not an expert in git but I think git would have something more integrated with stashes.
Maybe NetBeans shelves should use git stashes.
+1 for git stashes integration
i agree it would be a fine feature, especially an automatic stash in the pull scenario:
fetch -> stash -> merge/rebase -> stash apply
*** Bug 245205 has been marked as a duplicate of this bug. ***
+ 1 for the feature request stash while pulling, I created a ticket for such feature. Scenario is this:
Uncommited files, maybe of some changes which are not for commit and not for ignore because the file is important. When I pull and select rebase, I got the message to revert changes or review them and this is a pain in the ass.
The feature pull or fetch -> stash -> merge/rebase -> stash apply would be very nice. I think this functionality is already implemented in intelliJ :).
Here is the ticket for this: https://netbeans.org/bugzilla/show_bug.cgi?id=246075
This is essential
+1 (I registered myself because of this :) )
stashing is now supported: currently either by running Stash Changes git action from the quick search or from the popup on Stashes node under the Repository browser.
Applying and dropping stashes is also possible from the repository view: dbl-click on a stash (press Del resp. to drop it).
I will be working on a closer integration with Shelve changes now, so it primarily uses git stashes.
Integrated into 'main-silver', will be available in build *201412210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Ondrej Vrabec <email@example.com>
Log: #224986 - Stash functionality
Stashes are now displayed in the repository browser view under the Stashes node.
Stashes may be saved either from the repo browser when selecting Stash changes from
the popup on the Stashes node or by invoking Stash Changes action from the Quick Search view.
To apply a stash it's enough to dbl-click on its relevant node and to drop the stash simple Del
is available on the node.