git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merge into locally modified files?
@ 2009-06-08 17:30 skillzero
  2009-06-08 18:22 ` Johan Herland
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: skillzero @ 2009-06-08 17:30 UTC (permalink / raw)
  To: git

If I have some local changes to a file that I don't want to commit
(e.g. temp debug changes like printf's) and I see somebody else has
pushed some changes to that file, how do I merge their changes to the
file while trying to preserve my local changes (and conflicting if
it's not possible)?

After a git fetch, I tried 'git checkout --merge origin/master <path
to my locally modified file>', but that just overwrote my local
changes.

I'm converting people from CVS to git and this is a common thing
people do with CVS. They have some local changes and see that the
server has some other changes so they do 'cvs up' and it tries to
merge changes from the server into the locally modified file. The
local changes are often things that will never be committed. I know
git tries to avoid things you can't undo, but like a 'git checkout
<file>' that can't be undone, is there a way to say "merge what you
can and generate conflict markers for things you can't?".

I think what I want to do is the equivalent of rebasing for local
modified files rather than committed files.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-09  0:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 17:30 Merge into locally modified files? skillzero
2009-06-08 18:22 ` Johan Herland
2009-06-08 19:14   ` skillzero
2009-06-08 22:36     ` Johan Herland
2009-06-09  0:46     ` Sitaram Chamarty
2009-06-08 23:10 ` Andreas Ericsson
2009-06-08 23:19 ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).