git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[TopGit-PATCH] Force adding the .topmsg and .topdep files.

From
David Brown <git@davidb.org>
Date
Aug 14, 2008, 05:15 UTC
Message-ID
<1218690945-10322-1-git-send-email-git@davidb.org>

If the .gitignore in effect is ignoring the .topmsg and .topdeps files, tg create will fail trying to add these files. Add the '-f option to these add commands to force the files to be added anyway.

Signed-off-by: David Brown <git@davidb.org>
---
 tg-create.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tg-create.sh b/tg-create.sh
index 939af33..3f33fa8 100644
--- a/tg-create.sh
+++ b/tg-create.sh
@@ -100,7 +100,7 @@ git update-ref "refs/top-bases/$name" "HEAD" ""
 git checkout -b "$name"
 
 echo "$deps" | sed 's/ /\n/g' >"$root_dir/.topdeps"
-git add "$root_dir/.topdeps"
+git add -f "$root_dir/.topdeps"
 
 author="$(git var GIT_AUTHOR_IDENT)"
 author_addr="${author%> *}>"
@@ -118,7 +118,7 @@ author_addr="${author%> *}>"
 Signed-off-by: $author_addr
 EOT
 } >"$root_dir/.topmsg"
-git add "$root_dir/.topmsg"
+git add -f "$root_dir/.topmsg"
 
 
 
-- 
1.5.6.4
Message 1 of 1 in “Force adding the .topmsg and .topdep files.”
  1. Force adding the .topmsg and .topdep files.David Brown, Aug 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.