![]() You can also use stash.showIncludeUntracked to set whether -include-untracked is enabled by default. If no is provided, the default behavior will be given by the stash.showStat, and stash.showPatch config variables. By default, the command shows the diffstat, but it will accept any format known to git diff (e.g., git stash show -p to view the second most recent entry in patch form). Show the changes recorded in the stash entry as a diff between the stashed contents and the commit back when the stash entry was first created. The command takes options applicable to the git log command to control what is shown and how. is the latest entry, is the one before, etc.), the name of the branch that was current when the entry was made, and a short description of the commit the entry was based on. Each stash entry is listed with its name (e.g. List the stash entries that you currently have. ![]() Instead, all non-option arguments are concatenated to form the stash message. It differs from "stash push" in that it cannot take pathspec. This option is deprecated in favour of git stash push. ![]() The two exceptions to this are stash -p which acts as alias for stash push -p and pathspec elements, which are allowed after a double hyphen - for disambiguation. In this mode, non-option arguments are not allowed to prevent a misspelled subcommand from making an unwanted stash entry. The part is optional and gives the description 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 working tree and in the index). the integer n is equivalent to Commands push keep-index] ] Stashes may also be referenced by specifying just the stash index (e.g. is the most recently created stash, is the one before it, is also possible). The latest stash you created is stored in refs/stash older stashes are found in the reflog of this reference and can be named using the usual reflog syntax (e.g. ", but you can give a more descriptive 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. The modifications stashed away by this command can be listed with git stash list, inspected with git stash show, and restored (potentially on top of a different commit) with git stash apply. The command saves your local modifications away and reverts the working directory to match the HEAD commit. Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |