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:11:29 +0900 Message-ID: <87siclhz26.fsf@uwakimon.sk.tsukuba.ac.jp> References: <86egoeusg2.fsf@example.com> <87384qzxqy.fsf@igel.home> <83bnjen71r.fsf@gnu.org> <871tk6538w.fsf@gnu.org> <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> <551A59F1.3060602@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1427821926 29300 80.91.229.3 (31 Mar 2015 17:12:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 17:12:06 +0000 (UTC) Cc: schwab@suse.de, Harald Hanche-Olsen , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 19:11:57 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 1Yczhd-0001Wb-FO for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 19:11:49 +0200 Original-Received: from localhost ([::1]:39743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yczhc-000628-J1 for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 13:11:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YczhQ-000621-0i for emacs-devel@gnu.org; Tue, 31 Mar 2015 13:11:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YczhM-000108-SN for emacs-devel@gnu.org; Tue, 31 Mar 2015 13:11:35 -0400 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:52360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YczhM-0000zq-IU; Tue, 31 Mar 2015 13:11:32 -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 3DCE41C38F0; Wed, 1 Apr 2015 02:11:30 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 18F3B120EC9; Wed, 1 Apr 2015 02:11:30 +0900 (JST) In-Reply-To: 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:184656 Archived-At: Richard Stallman writes: > It usually takes weeks from when I write a change to when I check > it in to Savannah. To check them in, I must first get the latest > changes from Savannah. If I can't do a pull in that state, how can > I ever check them in? git stash git pull git stash apply # fix any conflicts git stash drop git commit git push If conflict fixing gets wedged, don't "stash drop" yet. Instead, "git reset --hard", then go to "git stash apply", and continue from there. Andreas's suggestion[1] is simpler but makes the history DAG ugly. In particular, your commit message may get buried deep in the commit log behind those of all of the pulled commits. You'll have to ask Stefan and the other frequent committers if they care about the ugliness. Some do and some don't. git commit git pull # fix any conflicts # if fixed conflicts, commit git push Note that if the conflict resolution work gets wedged, the "git reset --hard" strategy works here as well. You need to pull again rather than "stash apply", of course.[2] Footnotes: [1] Andreas was laconic as ever, but I'm pretty sure the intended strategy is to commit locally as soon as the change is complete to your satisfaction, then when you have net access to Savannah do the pulling and pushing. [2] This "pull" operation can also be done without a net connection, but you may need to use "git merge origin/master" instead of "git pull".