From: Jakub Narebski <jnareb@gmail.com>
To: Bill Priest <priestwilliaml@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: can't commit files that have been git add'ed because "fatal: you need to resolve your current index first"
Date: Wed, 28 Nov 2007 19:11:07 +0100 [thread overview]
Message-ID: <200711281911.07522.jnareb@gmail.com> (raw)
In-Reply-To: <993937.9873.qm@web55013.mail.re4.yahoo.com>
Bill Priest wrote:
> I understand what git is doing in terms of trying to
> merge. But it sounds like it is enforcing policy on
> the merge by not allowing me to check in files as I
> resolve them. I have two separate branches w/ a
> similar but not identical hardware platform where I
> will always get conflicts when I merge back and forth.
> Usually I cherry-pick between the two branches and
> this works until there are massive changes on one
> branch w/o time to move the changes to the other. In
> the latter case I do a merge and live w/ resolving
> conflicts.I guess w/ this workflow I have more
> conflicts than is "normal".
>
> It seems pretty heavy handed to force all merges to be
> complete before I can commit any files; git knows
> which files are unmerged. Does git track which files
> have been merged w/ conflicts? I'd like the option to
> be able to check in files that I have indicated have
> conflicts resolved (maybe w/ a flag to bypass the
> checking).
Yes, git does track which files have conflict, but I don't
think it does track which files were merged on file-level
without conflicts.
The problem is that git remember which files are yet not
resolved, and remembers that it is in the middle of the
merge by remembering parents of a merge. So I think if you
want to commit before doing merge, you would have to move
MERGE_HEAD away, and commit specifying paths using
"git commit <file1> <file2>". Or you can always resort
to low-level plumbing, for example creating temporary
staging area (index) etc.
But if you want to just make some commit to be cherry-picked
for example before merge, I think it would be easier to just
stash away merge, do a commit, then unstash it.
--
Jakub Narebski
Poland
next parent reply other threads:[~2007-11-28 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <993937.9873.qm@web55013.mail.re4.yahoo.com>
2007-11-28 18:11 ` Jakub Narebski [this message]
2007-11-30 16:32 can't commit files that have been git add'ed because "fatal: you need to resolve your current index first" Bill Priest
-- strict thread matches above, loose matches on Subject: below --
2007-11-29 4:10 Bill Priest
[not found] <251604.8861.qm@web55007.mail.re4.yahoo.com>
2007-11-28 16:55 ` Jakub Narebski
2007-11-28 15:48 Bill Priest
2007-11-28 15:53 ` Jakub Narebski
2007-11-28 20:08 ` Junio C Hamano
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=200711281911.07522.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=priestwilliaml@yahoo.com \
/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.