From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.devel Subject: Re: git is screwed Date: Thu, 26 Mar 2015 10:10:27 -0500 Organization: New Artisans LLC Message-ID: References: <20150322154147.GA6808@Tron.local> <20150323045209.GA71859@Tron.local> <550FE343.8010607@math.ntnu.no> <55119019.6030507@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427382687 9288 80.91.229.3 (26 Mar 2015 15:11:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Mar 2015 15:11:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 26 16:11:12 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 1Yb9Qu-00067r-GT for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 16:10:56 +0100 Original-Received: from localhost ([::1]:44918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb9Qt-00036M-Ja for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 11:10:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb9Qa-00036D-IQ for emacs-devel@gnu.org; Thu, 26 Mar 2015 11:10:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yb9QX-0007EX-LJ for emacs-devel@gnu.org; Thu, 26 Mar 2015 11:10:36 -0400 Original-Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:36672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb9QX-0007ET-GB for emacs-devel@gnu.org; Thu, 26 Mar 2015 11:10:33 -0400 Original-Received: by iedm5 with SMTP id m5so48718491ied.3 for ; Thu, 26 Mar 2015 08:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:in-reply-to:date:organization:message-id :references:user-agent:mail-followup-to:mime-version:content-type; bh=0gADl9L9oobSgwfgWfdyECF/HGAIc8PmMb1avKAoJ34=; b=DSq2yCHTl9mrZ3/Yv/3NC7Ee6zOs8Ihv3Hs+vRimTitHry63M/SbWGhYn4w/gNzESJ UzsoSZfpk2B+qFuFZM419tqat98SdHcNRlU+ZjTzPCSx6p8ZfC0ItauopRuT4n1tbTwF xkQdw8qo1RvlLNUb+mrD/hm6hq8ID8QsEwYvXbwbPobDg3SGP7XAV73fatqjlXkNJOTB gXzpvQf5TorVqpOYxy9H5V5KrmlpQCG037TAARFhOTRwO+2w71YOKHcHiZ32XNmtZt6E lmBeR0TJjYsCArdrXGFUB2B021PJ4bV3yl5IDirNTlIRXeUvs5eF/KoSYL3saM1OYpEV y3uA== X-Received: by 10.50.126.6 with SMTP id mu6mr38159585igb.4.1427382632929; Thu, 26 Mar 2015 08:10:32 -0700 (PDT) Original-Received: from Vulcan.local (c-98-214-120-98.hsd1.il.comcast.net. [98.214.120.98]) by mx.google.com with ESMTPSA id w9sm3261703igp.3.2015.03.26.08.10.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 08:10:31 -0700 (PDT) Original-Received: by Vulcan.local (Postfix, from userid 501) id 9505080ECFC6; Thu, 26 Mar 2015 10:10:30 -0500 (CDT) In-Reply-To: (Richard Stallman's message of "Thu, 26 Mar 2015 06:54:37 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::234 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:184331 Archived-At: >>>>> Richard Stallman writes: > Looking at man git-stash > save [-p|--patch] [--[no-]keep-index] [-u|--include-untracked] > [-a|--all] [-q|--quiet] [] > Save your local modifications to a new stash, and run git reset > --hard to revert them. The part is optional and gives the > description along with the stashed state. For quickly making a > snapshot, you can omit both "save" and , but giving only > does not trigger this action to prevent a misspelled > subcommand from making an unwanted stash. > That sounds dangerous so I didn't do it yet. Is that what I should do? Before you do a complex operation (such as a pull when you have both locally committed changes, and locally uncommitted changes), you can run "git stash" to safely squirrel away your work. It sounds dangerous from the man page, but it's a very safe operation. I do it regularly. Then, proceed with your complex operation. Once you get everything back to a sane and reasonable state, you can "git stash pop" to move your local changes from the stash back to the working tree. If these changes conflict, you will be left with conflicted files that need manual resolution, but that is all. Think of the stash as a highly temporary branch (which is what it really is, behind the scenes) to which your work has been saved for the time being. Some people have even created a "git-smart-pull" utility that automatically does a stash save/pop when necessary before a pull, in order to be consistent in their workflow. I don't have a link handy, but others might also use it and can comment. John