@@ -323,6 +323,16 @@ git shortlog -sne --after="28 Feb 2021" --before="01 Apr 2021" # short list of c
323
323
git shortlog --after=" 28 Feb 2021" --before=" 01 Apr 2021" --merges # merge commits, replace shortlog by log for commit messages
324
324
git log --format=%B -n 1 < commit-hash> # show commit message
325
325
git log --merges --first-parent master --pretty=format:" %h %C(blue)%<(15,trunc)%aN %C(white)%<(22)%ar%Creset %C(green)%s" # log of merge commits to master, with commit hash & author name
326
+
327
+ # Saving changes without committing
328
+ # https://stackoverflow.com/q/11269256
329
+ git stash push -m " stash name" # make a new stash
330
+ git stash list # list all available stashes
331
+ git stash show # show diff between stash and current state
332
+ git stash pop # apply stash and remove from stack
333
+ git stash apply # apply and keep stash in stack
334
+ git diff > path-name.patch # save WIP diff as a patch
335
+ git apply --3way some.patch # apply a patch like a stash
326
336
```
327
337
328
338
[ Atlassian Git Tutorials] ( https://www.atlassian.com/git/tutorials )
0 commit comments