From 6238aa9a57b633683b135ae81393cb1560625f24 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 2 Jun 2024 10:39:07 +0200 Subject: [PATCH] Add some more git options --- home-manager/git.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home-manager/git.nix b/home-manager/git.nix index df62f95..3f109b9 100644 --- a/home-manager/git.nix +++ b/home-manager/git.nix @@ -29,6 +29,14 @@ push.autoSetupRemote = true; init.defaultBranch = "main"; merge.conflictstyle = "zdiff3"; + + # https://github.com/rust-lang/rust/blob/a83cf567b5949691de67f06895d9fe0404c40d27/.git-blame-ignore-revs + blame.ignoreRevsFile = ".git-blame-ignore-revs"; + + # This makes it so that pushing always uses SSH, even if the remote was configured as HTTPS. + "url \"git@github.com:\"".pushInsteadOf = "https://github.com/"; + "url \"git@gitlab.com:\"".pushInsteadOf = "https://gitlab.com/"; + "url \"git@gist.github.com:\"".pushInsteadOf = "https://gist.github.com/"; }; }; }