Skip to content

Instantly share code, notes, and snippets.

@svenluijten
Last active May 16, 2021 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svenluijten/be137ce8bc2f10f043b08f26cf45d71f to your computer and use it in GitHub Desktop.
Save svenluijten/be137ce8bc2f10f043b08f26cf45d71f to your computer and use it in GitHub Desktop.
[user]
useConfigOnly = true
# name = Robin Hood
# email = your-email@example.com
signingkey = <gpg signing key>
[alias]
st = "status"
lg = log --graph --date=human --pretty=default
df = "diff --"
ap = "add -p"
find = "log --pretty=\"format:%Cblue%H %Cgreen%s%Creset\" --abbrev-commit --grep"
nah = !git reset --hard && git clean -df
publish = "!git push origin $(git symbolic-ref --short HEAD) -u"
track = !git branch --set-upstream-to origin/$1
[pretty]
default = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset
[core]
whitespace = "-trailing-space,tabwidth=4"
excludesFile = ~/.gitignore
[push]
followTags = true
[tag]
forceSignAnnotated = true
[grep]
lineNumber = true
[commit]
gpgsign = true
[gpg]
program = <path to gpg executable>
[init]
defaultBranch = main
[pull]
rebase = true
[status]
showUntrackedFiles = all
short = true
branch = true
# JetBrains IDE
.idea/
# PhpUnit
.phpunit.result.cache
# macOS
*.DS_Store
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
#
# Add the following SSH keys to the session
#
IdentityFile ~/.ssh/id_ed25519
#
# Personal Connections
#
Host github
User git
HostName github.com
Host gitlab
User git
HostName gitlab.com
Host *
IdentityFile ~/.ssh/id_ed25519
AddKeysToAgent yes
UseKeychain yes
PubkeyAuthentication yes
IdentitiesOnly yes
UseRoaming no
Port 22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment