How can you unstash changes using EGit?

29,242

Solution 1

EGit 3.5 and later

In EGit 3.5 and later, there is a menu called Stashes in the Team context menu. It provides an action to stash changes and also lists any existing stashes. The same menu is also available as a toolbar icon and in the Git Repositories view:

stash menu

Selecting an existing stash from the menu opens it in a viewer. The changes can be inspected and there are actions for applying the stash or deleting it:

stash viewer

EGit 3.4 and ealier

  1. Open the Git Repositories view (Ctrl+3 and typing, Cmd+3 on Mac OS X)
  2. Expand the node of the corresponding repository
  3. Expand the Stashed Commits node
  4. Open the context menu of the stash and select Apply Stashed Changes

Solution 2

In Eclipse (Luna) + eGIT, you can restore stash as enter image description here

Share:
29,242
Edd
Author by

Edd

I'm a java developer and I ain't afraid to show it

Updated on July 13, 2022

Comments

  • Edd
    Edd almost 2 years

    When I switch branch with non-committed changes I'm given a prompt to stash my changes:

    enter image description here

    When I switch back to the branch with the stashed changes I can't see any of the non-committed changes.

    Using EGit how can I retrieve the stashed changes?