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

seperate commits for objects already updated in index?

From
PJPaul Jakma <paul@clubi.ie>
Date
Mar 14, 2006, 16:37 UTC
Message-ID
<Pine.LNX.4.64.0603141634010.5276@sheen.jakma.org>
Hi,

Dumb question, imagine you made changes to a few files, and ran update-index at various stages in between:

$ git status # # Updated but not checked in: # (will commit) # # modified: foo/ChangeLog # modified: foo/whatever # modified: bar/ChangeLog # modified: bar/other

The changes in bar/ are unrelated to the changes in foo/ - how do you commit each seperately? Git doesn't seem to want to let me:

   $ git commit -o bar
   Different in index and the last commit:
   M       bar/ChangeLog
   M       bar/other
   You might have meant to say 'git commit -i paths...', perhaps?
git commit on its own wants to commit all the above files.
what's the silly thing I've missed?
Thanks.
regards,
-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
Never tell a lie unless it is absolutely convenient.
Next: Linus Torvalds
Message 1 of 11 in “seperate commits for objects already updated in index?”
  1. Paul JakmaMar 14, 2006
  2. Linus TorvaldsMar 14, 2006
  3. Paul JakmaMar 14, 2006
  4. Linus TorvaldsMar 14, 2006
  5. Paul JakmaMar 14, 2006
  6. Junio C HamanoMar 14, 2006
  7. Junio C HamanoMar 15, 2006
  8. Paul JakmaMar 15, 2006
  9. Andreas EricssonMar 15, 2006
  10. Junio C HamanoMar 15, 2006
  11. Andreas EricssonMar 15, 2006

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.