aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-04-07 06:57:00 -0700
committerFranck Cuny <franck@fcuny.net>2025-04-07 06:57:53 -0700
commitdde5b3483806c8b536eac566ff12a447fcdb8482 (patch)
tree3c2f38107513f21278913854428f23fd6160c94c /nix
parentmore starship configuration (diff)
downloadinfra-dde5b3483806c8b536eac566ff12a447fcdb8482.tar.gz
git configuration
mostly applying stuff from https://blog.gitbutler.com/how-git-core-devs-configure-git/
Diffstat (limited to 'nix')
-rw-r--r--nix/users/fcuny/git.nix29
1 files changed, 24 insertions, 5 deletions
diff --git a/nix/users/fcuny/git.nix b/nix/users/fcuny/git.nix
index 81a9355..92f4f52 100644
--- a/nix/users/fcuny/git.nix
+++ b/nix/users/fcuny/git.nix
@@ -74,18 +74,35 @@
extraConfig = {
core.whitespace = "trailing-space,space-before-tab";
- color.ui = "true";
+ color.ui = true;
- # abort if the remote branch does not match the local one
- push.default = "simple";
+ # nicer output
+ column.ui = "auto";
# https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/
diff.algorithm = "histogram";
init.defaultBranch = "main";
+ # https://blog.gitbutler.com/how-git-core-devs-configure-git/
+ push = {
+ # abort if the remote branch does not match the local one
+ default = "simple";
+ autoSetupRemote = true;
+ followTags = true;
+ };
+
+ fetch = {
+ prune = true;
+ pruneTags = true;
+ all = true;
+ };
+
pull.rebase = true;
+
rebase = {
+ autosquash = true;
+ updateRefs = true;
# Automatically create a temporary stash entry before the
# operation begins, and apply it after the operation ends.
autoStash = true;
@@ -93,8 +110,10 @@
missingCommitsCheck = "warn";
};
- branch.autosetuprebase = "remote";
- branch.sort = "authordate";
+ branch = {
+ autosetuprebase = "remote";
+ sort = "authordate";
+ };
url = {
"ssh://git@github.rbx.com/" = {