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

[Q] Mark files for later commit?

From
DNDaniel Nyström <daniel.nystrom@timeterminal.se>
Date
Mar 29, 2011, 06:04 UTC
Message-ID
<AANLkTi=rPAQas3gvHJ+EFYTXP_YXuULQMk8o8pgkj=9T@mail.gmail.com>
Hi folks!

I just hit into an situation where a certain file contains a human written changelog, which is modified (not prepended) for each single commit in the project, is being committed along with the actual patch.

This approach makes it very difficult to backport the commits, since it will always try patching the changelog file as well.

The changelog is only supposed to be committed at new releases, but is kept maintained continuously so stuff won't be forgotten.

So this makes me wonder, is there a way to mark certain files for being committed later on? Which does not automatically get added to the staging area (on "git commit -a" or "git add ." and so on) unless it's specifically mentioned by "git add"?

We've discussed making it generated automatically, but that's not as easy as it may sound.

How would you like a git feature like described above, marking files for later inclusion?

Thanks! -- Daniel

Next: Junio C Hamano
Message 1 of 9 in “[Q] Mark files for later commit?”
  1. Daniel NyströmMar 29, 2011
  2. Junio C HamanoMar 29, 2011
  3. Michael J GruberMar 29, 2011
  4. Johan HerlandMar 29, 2011
  5. Michael J GruberMar 29, 2011
  6. Junio C HamanoMar 29, 2011
  7. Daniel NyströmMar 29, 2011
  8. Michael J GruberMar 29, 2011
  9. Daniel NyströmMar 29, 2011

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.