Last active
December 1, 2016 11:26
-
-
Save otech-nl/43d2f4bbaec73d8b85e2ce3eaf231e92 to your computer and use it in GitHub Desktop.
git tips
This file contains hidden or 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
# extract a distributable archive, with changed files only (archive name derived from directory name and date): | |
alias git-diff="git diff --name-only HEAD^1 HEAD | zip ../${PWD##*/}-`date +%Y%m%d`-diff.zip -@" | |
# archive the current state: | |
alias git-archive="git archive --format=zip HEAD >../${PWD##*/}-`date +%Y%m%d`.zip" | |
# silence annoying CLRF warnings with: | |
git config --global core.autocrlf false | |
# remember credentials | |
git config --global credential.helper store | |
# ignore files for an export or archive with .gitattributes: | |
.gitattributes export-ignore | |
.gitignore export-ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment