From: Nanako Shiraishi Date: Sat, 19 Jul 2008 05:13:29 GMT Subject: Re: What's cooking in git.git (topics) Message-ID: <20080719141329.6117@nanako3.lavabit.com> In-Reply-To: <7vtzen7bul.fsf@gitster.siamese.dyndns.org> Quoting Junio C Hamano : > I tried not to sound too negative when describing -Xours and -Xtheirs > there, but actually I think "-s theirs" is even worse. It is how you > would discard what you did (perhaps because the other side has much better > solution than your hack), but that can be much more easily and cleanly > done with: > > $ git reset --hard origin > > Some poeple might say "But with 'merge -s theirs', I can keep what I did, > too". That reset is simply discarding what I did. > > That logic also is flawed. You can instead: > > $ git branch i-was-stupid > $ git reset --hard origin > > if you really want to keep record of your failure. > > One big problem "-s theirs" has, compared to the above "reset to origin, > discarding or setting aside the failed history" is that your 'master' > history that your further development is based on will keep your failed > crap in it forever if you did "-s theirs". Hopefully you will become a > better programmer over time, and you may eventually have something worth > sharing with the world near the tip of your master branch. When that > happens, however, you _cannot_ offer your master branch to be pulled by > the upstream, as the wider world will not be interested in your earlier > mistakes at all. Thanks for sharing your insight. Perhaps the above can become a separate pargraph to explains why there is no "theirs" merge strategy somewhere in the manual? -- Nanako Shiraishi http://ivory.ap.teacup.com/nanako3/