From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Wed, 01 Apr 2015 02:38:34 +0900 Message-ID: <87pp7phxt1.fsf@uwakimon.sk.tsukuba.ac.jp> References: <838ueezgyk.fsf@gnu.org> <878ueejnjz.fsf@uwakimon.sk.tsukuba.ac.jp> <83twx2xoc8.fsf@gnu.org> <87619hke3u.fsf@uwakimon.sk.tsukuba.ac.jp> <551A3F17.6020903@math.ntnu.no> <20150331085055.GA2871@acm.fritz.box> <87zj6tiko1.fsf@uwakimon.sk.tsukuba.ac.jp> <20150331104935.GB2871@acm.fritz.box> <86ego5cp95.fsf@dod.no> <20150331154839.GE2871@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1427823552 25561 80.91.229.3 (31 Mar 2015 17:39:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 17:39:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 19:39:07 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yd07w-0006ht-MY for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 19:39:00 +0200 Original-Received: from localhost ([::1]:39876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd07r-0008Bq-5l for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 13:38:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd07d-0008Bk-7J for emacs-devel@gnu.org; Tue, 31 Mar 2015 13:38:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yd07Z-0002I4-6M for emacs-devel@gnu.org; Tue, 31 Mar 2015 13:38:41 -0400 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:52563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd07Y-0002Ht-T4 for emacs-devel@gnu.org; Tue, 31 Mar 2015 13:38:37 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by shako.sk.tsukuba.ac.jp (Postfix) with ESMTPS id 659281C3853; Wed, 1 Apr 2015 02:38:34 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 3AE67120EC9; Wed, 1 Apr 2015 02:38:34 +0900 (JST) In-Reply-To: <20150331154839.GE2871@acm.fritz.box> X-Mailer: VM undefined under 21.5 (beta34) "kale" 83e5c3cd6be6 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.158.97.161 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184660 Archived-At: Alan Mackenzie writes: > I've never used git reset or a git --force argument. I did lose > some changes, however. The only other possibilities I can think of is that for some reason you nuked them yourself and forgot about it (perhaps you never saved them), or that you "lost" them on a different branch, and they're still in your repo, you just don't know where to find them. > That's a fix? So every time I want to do a pull I have to stash, pull, > unstash. Yuck! A proper fix would be for merge to actually merge the > new changes into the working directory. You may think that's a fix, but the git developers will call it a bug, because it's irreversible -- there's no way for git to get back to the pre-merge state, ensuring that your uncommitted changes are preserved. And they're in good company: Mercurial won't allow you to do that *at all* AFAICT (and the restriction is *not* documented in that man page you think is so concise and adequate), and Bazaar requires that you use "bzr merge --force". I really don't understand how you can criticize git alone for this. > Not me. In my normal workflow, I commit at the last minute, then > push. Risk-lover! No wonder you lose changes. > Just before committing, I get the latest changes from savannah, do > any necessary merging, then commit and push as quickly as possible. > This is to minimise the hassle which invariably occurs when other > people's commits get mixed up with my own. I think that "git pull --rebase" was made in heaven for you. > Is it really too much to expect that git merge should merge these > new fetched changes into my working directory? If you have uncommitted changes, yes, it's too much to expect. See above.