summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-02-08 11:42:49 -0600
committerChristian Cleberg <[email protected]>2026-02-08 11:42:49 -0600
commitab794ba43632d7e966999be63bfcc832614daf04 (patch)
treedbf3cdc8b3c73326e885c3d6f7649c6200ee8383 /git
parent3590ac9352451da9ce873d908a94111c71c4defc (diff)
downloaddotfiles-ab794ba43632d7e966999be63bfcc832614daf04.tar.gz
dotfiles-ab794ba43632d7e966999be63bfcc832614daf04.tar.bz2
dotfiles-ab794ba43632d7e966999be63bfcc832614daf04.zip
switch to GNU Stow
Diffstat (limited to 'git')
-rw-r--r--git/.gitconfig51
1 files changed, 51 insertions, 0 deletions
diff --git a/git/.gitconfig b/git/.gitconfig
new file mode 100644
index 0000000..2792bce
--- /dev/null
+++ b/git/.gitconfig
@@ -0,0 +1,51 @@
+# This is Git's per-user configuration file.
+[user]
+ name = Christian Cleberg
+ signingkey = [email protected]
+[core]
+ editor = emacs
+ autocrlf = input
+ untrackedCache = true
+
+[alias]
+ # Quick status and logs
+ st = status
+ co = checkout
+ br = branch
+ # A beautiful, readable graph log
+ lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
+ # Undo the last commit but keep changes
+ uncommit = reset --soft HEAD~1
+ # Clean up merged branches
+ trim = !git branch --merged | grep -v '*' | xargs -n 1 git branch -d
+
+[color]
+ ui = auto
+
+[init]
+ defaultBranch = main
+
+[push]
+ # Push to the current branch by default
+ default = current
+ # Automatically setup remote tracking on first push
+ autoSetupRemote = true
+
+[pull]
+ # Avoid creating unnecessary merge commits when pulling
+ rebase = true
+
+[rebase]
+ # Automatically stash changes before rebasing and pop after
+ autoStash = true
+
+[diff]
+ # Use an algorithmic approach that produces more readable diffs
+ algorithm = histogram
+ # Detect renames better
+ renames = true
+
+[help]
+ # Correct typos automatically (0.5 second delay)
+ autocorrect = 5