summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-11-15 11:48:51 -0500
committerBen Sima <ben@bsima.me>2022-11-15 11:48:51 -0500
commit3beb3a8f334b7efa58fb8ca6aa5c8409325435df (patch)
treee035415a017cd91bc4f4bfad45430320350292ff
parent92521e0c88bf49eb5e1bd6c59c2d9eea32bac1be (diff)
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
-rw-r--r--lib/common.nix15
-rw-r--r--lib/packages.nix1
2 files changed, 9 insertions, 7 deletions
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