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

git 1.8.0.rc0.18.gf84667d trouble with "git commit -p file"

From
Horst H. von Brand <vonbrand@inf.utfsm.cl>
Date
Oct 5, 2012, 14:20 UTC
Message-ID
<201210051420.q95EKjj3008300@netbook1.inf.utfsm.cl>
What I did:
- New file images/coins.asy ~~-> 'git add images/coins.asy'
- Started adding new stuff to fg.tex
- Noticed a old bug in fg.tex, fixed that one
- Did 'git -pm "Some message"' and selected just the bugfix
But git created a commit _including_ the new file. Tried to go back:
- 'git reset HEAD^'
Now the new file isn't staged anymore
What I expected to happen:
- Only the explicitly selected chunks commited
- No "losing staged changes"
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile 2340000       Fax:  +56 32 2797513
Next: Frans Klaver
Message 1 of 16 in “git 1.8.0.rc0.18.gf84667d trouble with "git commit -p file"”
  1. Horst H. von BrandOct 5, 2012
  2. Frans KlaverOct 5, 2012
  3. Junio C HamanoOct 5, 2012
  4. Jeff KingOct 5, 2012
  5. Junio C HamanoOct 6, 2012
  6. Jeff KingOct 6, 2012
  7. Junio C HamanoOct 6, 2012
  8. Jeff KingOct 6, 2012
  9. Conrad IrwinOct 6, 2012
  10. Jeff KingOct 6, 2012
  11. Junio C HamanoOct 7, 2012
  12. Jeff KingOct 7, 2012
  13. Junio C HamanoOct 7, 2012
  14. Jeff KingOct 7, 2012
  15. Conrad IrwinOct 11, 2012
  16. Junio C HamanoOct 11, 2012

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.