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

Re: What's cooking in git.git (topics)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 30, 2006, 11:22 UTC
Message-ID
<Pine.LNX.4.63.0612301217010.19693@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<Pine.LNX.4.64.0612292219280.18171@xanadu.home>
Hi,
On Fri, 29 Dec 2006, Nicolas Pitre wrote:
Show 19 quoted lines
> On Fri, 29 Dec 2006, Johannes Schindelin wrote:
> 
> > On Thu, 28 Dec 2006, Junio C Hamano wrote:
> > 
> > > * jc/3way (Wed Nov 29 18:53:13 2006 -0800) 1 commit
> > >  + git-merge: preserve and merge local changes when doing fast
> > >    forward
> > 
> > I'd like this, but behind a command line switch. And in addition to 
> > saying "cannot merge, blabla needs update", git could spit out "if you 
> > want to risk a 3way merge, go ahead and add the --preserve-local flag 
> > to git-merge".
> > 
> > Comments?
> 
> Is there really a point for not always doing it?
> 
> IOW, if you really want a command line switch, maybe it should be used 
> to prevent the above not to allow it?

There is a drawback to enabling this all the time. If the merge screws up with gazillions of conflicts, because I pulled the wrong branch, I am so used to "git reset --hard". Bummer. All my changes lost.

That is why we encourage commit-before-pull, to have a saved state.

(Of course, the correct thing would not be "git reset --hard", but rather "git diff --ours | git apply -R; git reset", but that's a tad long, no?)

Ciao, Dscho

Previous: Nicolas PitreNext: Raimund Bauer
Message 6 of 8 in “What's cooking in git.git (topics)”
  1. Junio C HamanoDec 29, 2006
  2. Johannes SchindelinDec 29, 2006
  3. Jakub NarebskiDec 29, 2006
  4. Junio C HamanoDec 29, 2006
  5. Nicolas PitreDec 30, 2006
  6. Johannes SchindelinDec 30, 2006
  7. Raimund BauerDec 30, 2006
  8. Johannes SchindelinDec 30, 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.