Git: Difference between revisions

imported>Zaporter
m Add explicit instructions for the common use case of enabling git lfs
imported>RichardJActon
Add an example of setting a simple option in gitconfig with an attribute set in extraConfig
Line 60: Line 60:
           pkgs.git.override { withLibsecret = true; }
           pkgs.git.override { withLibsecret = true; }
         }/bin/git-credential-libsecret";
         }/bin/git-credential-libsecret";
    };
  };
}
</syntaxhighlight>
For example to add additional configuration you can specify options in an attribute set, so to add something like this:
<syntaxhighlight lang="ini">
[push]
        autoSetupRemote = true
</syntaxhighlight>
To your <code>~/.config/git/config</code>, you can add the below to <code>extraConfig</code>
<syntaxhighlight lang="nix">
{ pkgs, ... }:
{
  programs.git = {
    enable = true;
    extraConfig = {
      push = { autoSetupRemote = true; };
     };
     };
   };
   };