![]() ![]() States only for the files that match the pathspec. When pathspec is given to git stash push, the new stash entry records the modified The two exceptions to this are stash -p which acts as alias for stash push -pĪnd pathspecs, which are allowed after a double hyphen - for disambiguation. In this mode, non-option argumentsĪre not allowed to prevent a misspelled subcommand from making an unwanted stashĮntry. The part is optional and gives theĭescription along with the stashed state.įor quickly making a snapshot, you can omit "push". Save your local modifications to a new stash entry and roll them back to HEAD (in the The integer n is equivalent to keep-index] Stashes may also be referenced by specifying just the stash index (e.g. The most recently created stash, is the one before it, isĪlso possible). Reflog of this reference and can be named using the usual reflog syntax (e.g. The latest stash you created is stored in refs/stash older stashes are found in the ", but you can give a moreĭescriptive message on the command line when you create one. A stash is by default listed as "WIP on branchname. Calling git stash without any arguments is equivalent to git stash push. Inspected with git stash show, and restored (potentially on top of a different commit) The modifications stashed away by this command can be listed with git stash list, Modifications away and reverts the working directory to match the HEAD commit. Index, but want to go back to a clean working directory. Use git stash when you want to record the current state of the working directory and the Git-stash - Stash the changes in a dirty working directory away ![]()
0 Comments
Leave a Reply. |