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

RE: Files different for me

From
JDJohn Dlugosz <jdlugosz@tradestation.com>
Date
Feb 25, 2009, 19:38 UTC
Message-ID
<450196A1AAAE4B42A00A8B27A59278E709E048E4@EXCHANGE.trad.tradestation.com>
In-Reply-To
<76718490902251116l12e7d3c5jb42657cb0432ae40@mail.gmail.com>

=== re: === Have pull detect this case and stash if so, with a message to the user to pop the stash after they have committed the merge results? Or would it make more sense to do it in merge? Maybe a pre-merge hook? ===end===

I've wondered a couple times how to abort a merge.  I ended up just deleting all the funny files.  Did I understand correctly that "git reset --merge" is a new feature?

Perhaps best practice, if I have stuff I've added but don't want to commit yet (why? add the files as you touch them so you don't forget? keep them from getting confused with the ones you intend to not add at all?), or changes I've not added yet, would be to "stash" first, do the pull, then "stash apply".

With the existence of a clean way to abort the merge, I could just pull with the assumption that there will be no conflicts, then abort, stash, pull again if needed.  Without the ability to abort the merge, the stakes are high to risk the assumption that all will go well.  So, always stash first.  

Assuming that is correct, it inspires this behavior: Automatically stash and apply first, then merge. If merge is clean, delete the stash. If intervention is needed, I have the stash state to reset to if necessary, and to show me what was already changed if I need to know that.

But I'm still mixed up.  What is the requirement here?  I can understand the need to pull to keep current but not publish my own changes yet.  But why is it necessary to preserve the fact that _some_ (not all) of the changes are in the index?
--John
Previous: Jay SoffianNext: John Dlugosz
Message 14 of 17 in “Files different for me”
  1. John DlugoszFeb 25, 2009
  2. Brian GernhardtFeb 25, 2009
  3. John DlugoszFeb 25, 2009
  4. Brian GernhardtFeb 25, 2009
  5. John DlugoszFeb 25, 2009
  6. Matthieu MoyFeb 25, 2009
  7. Junio C HamanoFeb 25, 2009
  8. Linus TorvaldsFeb 25, 2009
  9. Junio C HamanoFeb 25, 2009
  10. Linus TorvaldsFeb 25, 2009
  11. Junio C HamanoFeb 25, 2009
  12. Linus TorvaldsFeb 25, 2009
  13. Jay SoffianFeb 25, 2009
  14. John DlugoszFeb 25, 2009
  15. John DlugoszFeb 25, 2009
  16. Junio C HamanoFeb 25, 2009
  17. Feanil PatelFeb 25, 2009

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.