From abf51a8ac2d0429edbccc5c1d1a436755276b4c4 Mon Sep 17 00:00:00 2001 From: Jan Jastrow Date: Sun, 23 Jun 2024 00:56:57 +0200 Subject: [PATCH] Add a couple of settings --- gitconfig | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/gitconfig b/gitconfig index 1d0fad6..6aacf5b 100644 --- a/gitconfig +++ b/gitconfig @@ -1,9 +1,22 @@ -# This is Git's per-user configuration file. +# Custom (default) settings for git [user] -# Please adapt and uncomment the following lines: -name = Jan Jastrow -email = mail@jastrow.me + name = Jan Jastrow + username = jan_j + email = mail@jastrow.me [core] fsmonitor = true + editor = nano -w +[init] + defaultBranch = main +[alias] + br = branch + c = commit + co = checkout + ca = c -a + p = pull + l = log --all --color --graph --pretty=format:'%Cred%h%Creset %G?%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit # Colorful and easy to read log + conflict = diff --name-only --diff-filter=U + hash = !git rev-parse HEAD | cut -c 1-8 + undo = !f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f [branch] - sort = -committerdate + sort = -committerdate