Re: how to ignore merge conflicts?
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Oct 30, 2006, 19:53 UTC
- Message-ID
- <20061030195325.GB5504@spearce.org>
- In-Reply-To
- <200610301448.38222.len.brown@intel.com>
Len Brown <len.brown@intel.com> wrote:
Show 7 quoted lines
> Sometimes when a multiple-file merge give conflicts, I don't want to edit > one of the resulting <<<<<=====>>>>> files. > Instead, I just want to choose the version of that particular file that > existed in one of the two merged branches and commit that along with > the rest of the merge. > > How to do this?
Your branch is in stage 2 and the branch you are pulling is in stage 3. So if I ran:
git pull . other
then my HEAD before the pull is stage 2 and other is stage 3.
You can use checkout-index to get your version (stage 2) or the other version (stage 3):
git checkout-index -f --stage=2 .../path; # mine git checkout-index -f --stage=3 .../path; # other
then just make sure you update-index before you commit (git commit -a would do the trick too).