energy-quants / bootstrap

A repo containing scripts for bootstrapping a development environment
MIT License
0 stars 1 forks source link

`git` config #4

Open dhirschfeld opened 2 years ago

dhirschfeld commented 2 years ago
git config --global user.name "Dave Hirschfeld"
git config --global user.email "dave.hirschfeld@gmail.com"
git config --global pull.ff only
git config --global push.followTags true
git config --global pull.rebase true
git config --global rebase.autoStash true
git config --global submodule.recurse true
git config --global alias.amend 'commit --amend --no-edit'
git config --global alias.edit 'commit --amend --only'
git config --global clone.defaultRemoteName upstream
git config --global push.autosetupremote true
git config --global credential.helper "$(which git-credential-manager)"
git config --global credential.credentialstore cache
git config --global credential.cacheoptions '--timeout=36000 --socket /tmp/.git-credential-cache/socket'
git config --global credential.helper $(get-command git-credential-manager).Path
git config --global credential.credentialStore wincredman
git config --global core.longpaths true
git config --global http.sslbackend schannel
git config --list --show-origin
dhirschfeld commented 2 years ago
$email = "your.email@example.com"
ssh-keygen -t ed25519 -C "${email}"
ssh-add "~/.ssh/id_ed25519"
gh ssh-key add $(Resolve-Path "~/.ssh/id_ed25519.pub").Path
mkdir -p "~/.config/git"
Set-Content -Path "~/.config/git/allowed_signers" -Value "${email} $(cat '~/.ssh/id_ed25519.pub')"
git config --global gpg.format ssh
git config --global user.signingkey "~/.ssh/id_ed25519"
git config --global commit.gpgsign true
git config --global tag.gpgsign true
git config --global gpg.ssh.allowedSignersFile "~/.config/git/allowed_signers"
dhirschfeld commented 2 years ago

~~Add GCM to conda-forge: https://github.com/GitCredentialManager/git-credential-manager/blob/main/src/linux/Packaging.Linux/install-from-source.sh#L186~~

Done!

dhirschfeld commented 3 months ago

Configure delta

git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global merge.conflictstyle diff3
git config --global diff.colormoved default
git config --global delta.side-by-side true
git config --global delta.line-numbers true
dhirschfeld commented 2 months ago
git config --global core.editor "code-insiders --wait"