diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-23 16:25:32 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-23 16:25:32 +0200 |
commit | 09fc06daab280735dd2ec94276f00a9c5bffd9b2 (patch) | |
tree | 612169ea07106b8c9750edeef721dfb8a992cb33 | |
parent | 334e26bfc2ce82912602e8a0f9f9c7e0fb5c3221 (diff) |
nix flake init: Use git add --force
-rw-r--r-- | src/nix/flake.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 133e6c7e0..17df29fdb 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -589,7 +589,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand copyDir(templateDir, flakeDir); if (pathExists(flakeDir + "/.git")) { - Strings args = { "-C", flakeDir, "add", "--intent-to-add", "--" }; + Strings args = { "-C", flakeDir, "add", "--intent-to-add", "--force", "--" }; for (auto & s : files) args.push_back(s); runProgram("git", true, args); } |