From 09fc06daab280735dd2ec94276f00a9c5bffd9b2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 23 Jun 2020 16:25:32 +0200 Subject: [PATCH] nix flake init: Use git add --force --- src/nix/flake.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }