Difference between revisions of "Git/stash"
< Git
Jump to navigation
Jump to search
(Created page with "'''Action''': saves your local modifications away and reverts the working directory to match the HEAD commit ==Links== ===Documentation=== * [http://kernel.org/pub/software/sc...") |
(commands) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Action''': saves your local modifications away and reverts the working directory to match the HEAD commit | '''Action''': saves your local modifications away and reverts the working directory to match the HEAD commit | ||
+ | ==Commands== | ||
+ | * <code>git stash apply</code> replaces current files with the most recently stashed files (but does not delete the stash) | ||
+ | * <code>git stash drop</code> deletes the newest stash (i.e. the most recently stashed files) | ||
+ | * <code>git stash list</code> displays existing stashes, for all branches, sorted newest-to-oldest | ||
==Links== | ==Links== | ||
===Documentation=== | ===Documentation=== | ||
* [http://kernel.org/pub/software/scm/git/docs/git-stash.html manpage @ kernel.org] | * [http://kernel.org/pub/software/scm/git/docs/git-stash.html manpage @ kernel.org] | ||
+ | * [https://git-scm.com/book/en/v1/Git-Tools-Stashing 6.3 Git Tools - Stashing] |
Latest revision as of 12:36, 17 November 2018
Action: saves your local modifications away and reverts the working directory to match the HEAD commit
Commands
git stash apply
replaces current files with the most recently stashed files (but does not delete the stash)git stash drop
deletes the newest stash (i.e. the most recently stashed files)git stash list
displays existing stashes, for all branches, sorted newest-to-oldest