Git/stash: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
git tools for stashing
commands
 
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]
* [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

Documentation