From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Mon, 06 Apr 2015 16:58:09 +0200 Message-ID: <55229F01.6030002@gmx.at> References: <83twx2xoc8.fsf@gnu.org> <551A3F17.6020903@math.ntnu.no> <20150331085055.GA2871@acm.fritz.box> <87zj6tiko1.fsf@uwakimon.sk.tsukuba.ac.jp> <20150331104935.GB2871@acm.fritz.box> <87y4mdi7tj.fsf@uwakimon.sk.tsukuba.ac.jp> <20150331214347.GH2871@acm.fritz.box> <20150401103225.GA2633@acm.fritz.box> <87h9t080gx.fsf@javad.com> <83384jsx3o.fsf@gnu.org> <83pp7nrfdn.fsf@gnu.org> <83a8yqr226.fsf@gnu.org> <831tk2qvz5.fsf@gnu.org> <87384ii26v.fsf@uwakimon.sk.tsukuba.ac.jp> <83wq1tptvp.fsf@gnu.org> <87pp7lhc9h.fsf@uwakimon.sk.tsukuba.ac.jp> <83sichpqe9.fsf@gnu.org> <87ioddglu6.fsf@uwakimon.sk.tsukuba.ac.jp> <83a8yoq56m.fsf@gnu.org> <87384ghm1a.fsf@uwakimon.sk.tsukuba.ac.jp> <837ftspcis.fsf@gnu.org> <551FA115.5090400@gmx.at> <834mowp7cj.fsf@gnu.org> <55200A71.9040902@gmx.at> <83oan3onki.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1428332313 5354 80.91.229.3 (6 Apr 2015 14:58:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Apr 2015 14:58:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 06 16:58:25 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 1Yf8To-0005en-MK for ged-emacs-devel@m.gmane.org; Mon, 06 Apr 2015 16:58:24 +0200 Original-Received: from localhost ([::1]:40458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yf8To-0001Pu-2r for ged-emacs-devel@m.gmane.org; Mon, 06 Apr 2015 10:58:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yf8Tk-0001Pp-Ra for emacs-devel@gnu.org; Mon, 06 Apr 2015 10:58:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yf8Tj-0007VK-Qt for emacs-devel@gnu.org; Mon, 06 Apr 2015 10:58:20 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:54626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yf8Td-0007Te-Q1; Mon, 06 Apr 2015 10:58:14 -0400 Original-Received: from [93.82.14.197] ([93.82.14.197]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M8m7Q-1YZeqE3UJo-00CCfL; Mon, 06 Apr 2015 16:58:11 +0200 In-Reply-To: <83oan3onki.fsf@gnu.org> X-Provags-ID: V03:K0:y4hoGmT6uKBp38DCizjLvaztqcUXbE6vPWkJOQhCNQZC7FMSmtN wjs+3Nhgm2Zf7chpsrAUJydfUTGteR15D4rOLBj/s7G+271Ck18vERGuZE8OCSL+yYXkjw6 BsCH+ocz0vIC5z9x0nBZBgiGHVWW9hdtqBKwq1M1qfFC8h2P9JolE0yDVarZmgV0NVumR7Y GYfw38fZ+3s4p6YctVTpQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.15 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:185040 Archived-At: A few further comments on the last version of GitQuickStartForEmacsDevs: Optionally, before doing a commit, you can do git status and git diff to view the changes which will be committed by git commit -a (with no filename arguments). Couldn't we formulate this in a slightly more appealing way? Somehow in the sense of "in order to avoid commiting things you probably do not want to commit" do a 'git status' which will tell you which files are affected by the commit or 'git diff' which will give you the details. It is a good idea to examine what you are about to push, before actually doing so, because fixing mistakes before pushing is much easier (see the next section). To do that, use the command git diff origin/master. If you want to show your unpushed commits with their commit log messages, use git show origin/master.. instead. If you only have one local commit you want to push, just git show is enough. And here I would try to tell that the outputs of plain 'git diff' and 'git status' are different from their outputs before the commit. When I noticed that for the first time I was confused. To re-do the commit from scratch, use git reset HEAD^, then fix whatever needs fixing, and commit again. Maybe we should reassure readers here that their changes are not lost when they do that. error: Your local changes to the following files would be overwritten by merge: file1 Please, commit your changes or stash them before you can merge. Aborting To fix this, commit the offending files with Please tell readers here that git does not even try to check whether their changes would conflict with changes in the upstream repository. Otherwise, the cited section will confuse readers who expect conflicts exclusively due to the earlier ... This merge could fail due to conflicts between your changes and changes by others in the same portions of the same files. ... in particular the "in the same portions" part. At least I was initially stupefied by this when it happened the first time. In addition, saving any file whose conflicts were completely resolved (i.e., no conflict markers remain in it) invokes the git add command on that file, which prepares the file for merging and committing. Are we really 100% sure that 'git add' gets executed with all reasonable user customizations? Shouldn't we tell here how our reader can check whether the 'git add' was really performed? (It is recommended to do a git status before a commit without filename arguments to check for inadvertent changes that would be committed.) Doesn't this come now a bit late in the text given you latest changes? martin