From 3beb3a8f334b7efa58fb8ca6aa5c8409325435df Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 15 Nov 2022 11:48:51 -0500 Subject: organize and add some git configs push.default and remote.pushDefault combine to make a better branch-directed workflow by default: https://stackoverflow.com/questions/45638858/how-to-set-up-branches-with-different-pull-push-upstreams also set the default init branch to 'main' because its shorter than master Change-Id: I424c3e897954ffe3a9c7b8e6d6c6a0033cb8067b --- lib/common.nix | 15 ++++++++------- lib/packages.nix | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/common.nix b/lib/common.nix index 2f6c77e..247a81e 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -108,13 +108,16 @@ in { glog = ''log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; }; extraConfig = { - fetch.showForcedUpdate = "false"; - push.default = "simple"; - pull.rebase = "true"; commit.template = "${./git-commit-template}"; commit.verbose = "true"; - mergetool.fugitive.cmd = ''vim -f -c "Gvdiffsplit!" "$MERGED"''; + fetch.showForcedUpdate = "false"; + init.defaultBranch = "main"; + log.date = "local"; merge.tool = "fugitive"; + mergetool.fugitive.cmd = ''vim -f -c "Gvdiffsplit!" "$MERGED"''; + pull.rebase = "true"; + push.default = "current"; + remote.pushDefault = "origin"; sendemail = { #smtpuser = "ben@bsima.me"; #smtpserverport = 587; @@ -124,9 +127,7 @@ in { annotate = "yes"; cccmd = "git-contacts"; }; - log = { - date = "local"; - }; + }; }; diff --git a/lib/packages.nix b/lib/packages.nix index 717103f..a6c7baf 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -71,6 +71,7 @@ in { jq lsof mpc_cli + nb ncdu nmap ncmpc -- cgit v1.2.3