From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28384 invoked by alias); 14 Nov 2014 16:47:10 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19389 Received: (qmail 23623 invoked from network); 14 Nov 2014 16:47:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Fri, 14 Nov 2014 17:46:58 +0100 From: Nathan Schwarz To: zsh-users@zsh.org Subject: Re: git adventures Message-ID: <20141114164658.GA6418@Persephone> Mail-Followup-To: zsh-users@zsh.org References: <54663E52.9040406@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54663E52.9040406@eastlink.ca> User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - roshared2.hosthash.com X-AntiAbuse: Original Domain - zsh.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - notwhite.ro X-Get-Message-Sender-Via: roshared2.hosthash.com: authenticated_id: nathan@notwhite.ro On 11-14/ 9:39, Ray Andrews wrote: > Gitmeisters: > > (CAPS NOT YELLING ;-) > > pts/0 HP-y5--5-Debian1 root /aMisc/zsh-code $ git pull --rebase > Cannot pull with rebase: You have unstaged changes. > Please commit or stash them. > > pts/0 HP-y5--5-Debian1 root /aMisc/zsh-code $ git pull > remote: Counting objects: 41, done. > remote: Compressing objects: 100% (29/29), done. > remote: Total 29 (delta 23), reused 0 (delta 0) > Unpacking objects: 100% (29/29), done. > From git://git.code.sf.net/p/zsh/code > e334119..8505837 master -> origin/master > Updating e334119..8505837 > error: Your local changes to the following files would be > overwritten by merge: This will always fail as long as you have uncommitted or unstashed changes. This is to prevent data loss. > I'VE LEARNED ABOUT 'stage', BUT WHAT IS 'stash'? > HOW DO I commit/stash/stage THAT ONE FILE SO AS TO PROCEED? CAN WE TELL GIT > TO JUST NOT WORRY ABOUT THAT FILE--LEAVE IT BE, BUT PULL EVERYTHING ELSE? > THAT CHANGED FILE IS OBVIOUSLY ONLY OF TEMPORARY VALUE. `git stash $file` stashes changes as another form than a commit. This means - the changes you made to the file are saved by git and the working copy of your file is being reset to the index-file (working copy == file you edit; index-file == file saved by git to determine changes). This, of course, work also with just `git stash` to stash all current changes in all files. This way you can save changes on your local machine, pull changes from upstream and then reapply your stashed work with `git stash apply $stash`. To list saved states and get your $stash you can run `git stash list`. > > FANTASTIC DOC: > http://git-scm.com/book/en/v2 Refer to http://git-scm.com/book/en/v1/Git-Tools-Stashing for stashing. > > I'M LIKING AND RESPECTING GIT ALREADY. MOST COOL THAT IT CLONES IT'S OWN > ADMINISTRATION HERE AS WELL AS FILES, ALSO THAT IT REMEMBERS WHERE THE > MOTHER SHIP IS. GENUINELY HELPFUL ERROR MESSAGES! HOW UN-LINUX. That being said please respect our eyes and consider disabling caps-lock. -Nathan -- /"\ ASCII Ribbon Campaign \ / - against HTML emails X - against proprietory attachments / \ http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign