"git stash"

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3388 Reply
    Humble
    Keymaster

    Most of the people dont use #git stash , just because not much sure about how it work. It is really cool when you want to have a clean tree, especially when you want to merge or rebase without committing your current work.

    The workflow would be:

    # Without committing, save uncommitted changes to the current working area to the stash.

    git stash

    # To apply the previously saved ‘stash’, you have 2 ways. One is ‘pop’ and other is ‘apply’. If you go with the former it removes the entry from the ‘stack’, but with latter the entry is present on the stack. Either way it applies to the current working area.

    git stash pop
    or
    git stash apply

    # Examine the current state of the stash:

    git stash list

    # You can clear the entire stash:

    git stash clear

    #4762 Reply
    Humble
    Keymaster

    If you want to stash the untracked files try

    git stash -u

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: "git stash"
Your information: