ong-z
7/5/2016 - 8:39 AM

Git Stash

Git Stash

# see http://www.gitguys.com/topics/temporarily-stashing-your-work/
# git stash will not stash (save) files in the working directory unless the 
# files are being tracked (some version of the file has been added to the index).

# store state of working directory and makes it clean
git stash

# gets backs the stash (state of working directory)
git stash pop

# to check the various stash made in different branch
git stash list       

# to select the right one
git stash apply x    

# saving your stash with a save name:
git stash save "guacamole sauce WIP"

# you can use a regular expression to address that stash:
git stash apply stash^{/guacamo}
# This will apply the youngest stash that matches the regular expression guacamo.