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 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/common.nix') 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"; - }; + }; }; -- cgit v1.2.3