Created
January 27, 2022 17:22
Bash alias that does a git diff to see the files that have changed and creates a tarball of those files in a separate folder. Useful if you want to manually backup your diffs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gdbak='GDBAK_FILENAME="../../temp/diff-bak-$(date +%s%3N)_$(git branch --show-current).tar"; tar cvf "${GDBAK_FILENAME}" `git diff --name-only`; echo "${GDBAK_FILENAME}"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Of course you should change the prefix for "GDBAK_FILENAME" as needed