Last active
July 20, 2022 21:54
-
-
Save caffeinetiger/db632a3098d6c1b4944a2689bde9d888 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| git config --global pull.rebase true | |
| git config --global fetch.prune true | |
| git config --global diff.colorMoved zebra | |
| git config --global push.default current | |
| git config --global core.autocrlf true | |
| # For GPG signing | |
| git config --global commit.gpgsign true | |
| git config --global user.signingkey <GPG KEY ID> | |
| git config --global gpg.program gpg | |
| # Add interactive env for GPG in case a passcode is used. | |
| # Assume gpg is the program used for GPG singing | |
| BASHRC_FILE=~/.bashrc | |
| ZSHRC_FILE=~/.zshrc | |
| if [ -f "$ZSHRC_FILE" ]; then | |
| SOURCE_FILE=$ZSHRC_FILE | |
| else | |
| SOURCE_FILE=$BASHRC_FILE | |
| fi | |
| printf '\n' >> $SOURCE_FILE | |
| printf '\n# Make GPG signing interactive. This is is probably not needed if a passcode is not used.' >> $SOURCE_FILE | |
| printf '\nexport GPG_TTY=$(tty)' >> $SOURCE_FILE | |
| printf '\n' >> $SOURCE_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment