![]() ![]() To get a more detailed diff, pass the -patch or -p flag: $ git stash show -patchĭiff -git a/console/console-init/ui/package.json b/console/console-init/ui/package.json The command git stash show allows you to view the diff of a stash: $ git stash show | 4 +-Ĭonsole/console-init/ui/generated-frontend.ts | 742 +++++++++-Ĭonsole/console-init/ui/package.json | 2 +. git stash drop deletes a particular stash from the stash list.git stash clear empties the stash list by removing all the stashes.You must do this manually with the following commands: It is good practice to remove stashes that are no longer needed. You can choose which stash you want to pop or apply by passing the identifier as the last argument: $ git stash pop $ git stash apply Cleaning up the stash Popping is preferred if you don't need the stashed changes to be reapplied more than once. Both commands reapply the changes stashed in the latest stash (that is, A stash reapplies the changes while pop removes the changes from the stash and reapplies them to the working copy. You can reapply stashed changes with the commands git stash apply and git stash pop. $ git stash On master: remove semi-colon from WIP on master: d7435644 Feat: configure graphql endpoint Retrieving stashed changes ![]() Saved working directory and index state On master: remove semi-colon from schema To add a description to the stash, you can use the command git stash save : $ git stash save "remove semi-colon from schema" However, this limited amount of information isn't helpful when you have multiple stashes, as it becomes difficult to remember or individually check their contents. Stashes are saved in a last-in-first-out (LIFO) approach: $ git stash WIP on master: d7435644 Feat: configure graphql endpointīy default, stashes are marked as WIP on top of the branch and commit that you created the stash from. You can view your stashes with the command git stash list. (1/1) Stash this hunk ? Listing your stashes To stash specific files, you can use the command git stash -p or git stash –patch: $ git stash -patch
1 Comment
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |