![]() ![]() $ git stash push -m "modified the README.md" again Now, Git did not provide a default name (made by the last HEAD commit message) but it assigned a custom name to it.Īlternatively, you can use the “ git stash push” command in order to create a stash with a name. Saved working directory and index state On branch1: modified README.md $ git stash save "my_stash_name"īack to the example, we gave before on the branch named “branch1”, we would run $ git stash save "modified README.md" In order to create a git stash with a name, use the “save” command and specify the name of your stash. In this case, no names were assigned to our stash which might not be very handy if you want to pop your stash later on. Saved working directory and index state WIP on branch1: 808b598 Initial commitĪs you can see, my working directory as well as my index was saved for the “branch1” which is the current name of my branch.Īfter the colons, you can see the hash of the HEAD commit as well as the commit message: this is the name of your stash. $ git stashĪs a consequence, all the changes staged for commit in your current working directory will be saved on the side for later use. The easiest way to create a git stash is to simply run the “git stash” command without any parameters. #Pop stash gitkraken how toStashing changes come with a special set of Git commands intended to create, delete and apply stashes at will.ĭo Check: How To Set Upstream Branch on Git Create a Git stash Some of the helpful options are provided here: ![]() Several options are available with git stash. Stashing takes the messy state of your working directory, and temporarily saves it for further use.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |