From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Tue, 31 Mar 2015 17:07:44 +0200 Organization: Probably a good idea Message-ID: <86384lciin.fsf@dod.no> 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 X-Trace: ger.gmane.org 1427814508 26214 80.91.229.3 (31 Mar 2015 15:08:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 15:08:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 17:08:13 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 1Ycxlu-0004yt-Du for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 17:08:06 +0200 Original-Received: from localhost ([::1]:39137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycxlt-0001bY-PW for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 11:08:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycxlb-0001bM-V8 for emacs-devel@gnu.org; Tue, 31 Mar 2015 11:07:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcxlX-0000Qi-Ol for emacs-devel@gnu.org; Tue, 31 Mar 2015 11:07:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcxlX-0000QO-Ha for emacs-devel@gnu.org; Tue, 31 Mar 2015 11:07:43 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YcxlO-0004YJ-FW for emacs-devel@gnu.org; Tue, 31 Mar 2015 17:07:34 +0200 Original-Received: from cm-84.208.248.210.getinternet.no ([84.208.248.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Mar 2015 17:07:34 +0200 Original-Received: from sb by cm-84.208.248.210.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Mar 2015 17:07:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 47 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.248.210.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (windows-nt) Cancel-Lock: sha1:Q4H/Z4zaF4KWGW6t3QEEjHS05dM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:184647 Archived-At: >>>>> Richard Stallman : > Reportedly pull includes merge, so this implies that git pull is also > dangerous when you have made changes. Dangerous in which way? If you have committed your changes locally, and do a pull, and there are no conflicts, will be a new commit on your master (the merge commit), but no harm done otherwise. If you get a conflict in the merge, git will not complete the commit until the conflict is handled (much as any version control system). If you have uncommitted changes and the merge in the pull command doesn't touch any of the files with uncommitted changes, and there is no conflict, there may be a new commit (the pull could also be a fast-forward, in which case there is no commit), and your changes will still be in the working directory. If there is a conflict, the merged files with no conflict will be staged for commit, both your local changes and the files will be seen as unstaged modified files (but the conflicted files are shown as such, at least in magit). If the pull merge affects any of the files you have uncommitted changes in, then git refuses to merge (refuses to overwrite your local changes). You need to either stash your local changes, or put them on a local commit before git will do the merge. > 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? You can do a pull. The simplest way to avoid most of the possible conflicts would be to git stash git pull git stash pop before you commit. But note that "git stash pop" can have conflicts, and git pull may have conflicts (if you don't have any other local changes except your uncommitted changes, ie. no local commits, then pull will never have conflicts).