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