All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Raible <raible@nextest.com>
To: Pretty Boy Floyd <boxerab@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: Git Stash stages files if there is a conflict
Date: Mon, 18 Oct 2010 10:18:25 -0700	[thread overview]
Message-ID: <4CBC8161.3080507@nextest.com> (raw)
In-Reply-To: <loom.20101015T220924-952@post.gmane.org>

On 11:59 AM, Pretty Boy Floyd wrote:
> Hello!
> 
> I am running msysgit 1.7.3.1.  If I run stash apply, and there is a conflict,
> all of my stash changes get staged. Is this the correct behaviour? I found it a
> little surprising.

My tests indicate that the same thing happens as with any conflicted merge.
Namely: non-conflicting changes get staged, and conflicting changes are left
only in the working directory (with conflict markers added as appropriate).

See http://progit.org/book/ch3-2.html#basic_merging,
especially the part on conflicts.

> Another question: if I have stashed 10 files, and there is a conflict in one of
> them, will stash apply abort when it has a conflict, or will it apply all
> non-conflicted files.

Same as above.  In both cases the stash is unaffected, which allows
you to reset and try again.

> Finally, if I do the following:
> 
> git stash
> git pull
> git stash apply
> 
> and another developer has removed a file that I have stashed, then I am unable
> to apply the stash  on this file. How can I retrieve my changes from the stash?

One nice (relatively new feature) is "git stash branch", which makes a new
branch from an existing stash.

HTH - Eric

  parent reply	other threads:[~2010-10-18 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15 20:13 Git Stash stages files if there is a conflict Pretty Boy Floyd
2010-10-18  9:33 ` Tor Arntsen
2010-10-18 17:18 ` Eric Raible [this message]
2010-10-18 17:56   ` Aaron Boxer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBC8161.3080507@nextest.com \
    --to=raible@nextest.com \
    --cc=boxerab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.