git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: can't commit files that have been git add'ed because "fatal: you need to resolve your current index first"

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 28, 2007, 15:53 UTC
Message-ID
<fik2ua$i8b$1@ger.gmane.org>
In-Reply-To
<820179.5481.qm@web55002.mail.re4.yahoo.com>
Bill Priest wrote:
Show 10 quoted lines
> All,
>   I merged from one branch to another and had lots of
> conflicts.  I've resolved a set of files from the
> conflicts (in a directory) and did a git-add on this
> set of files.  I wasn't able to commit these files. 
> On IRC I was told that all files must be resolved
> before I can commit any of them.  This seems pretty
> limiting.  Why is a commit after a merge all or
> nothing; I thought that git  figured out merges and
> such by the differences between files??

You have to resolve _conflicts_ only. The rest is added automatically. See git-status, git diff --merge, git ls-files -u.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Bill PriestNext: Junio C Hamano
Message 2 of 3 in “can't commit files that have been git add'ed because "fatal: you need to resolve your current index first"”
  1. Bill PriestNov 28, 2007
  2. Jakub NarebskiNov 28, 2007
  3. Junio C HamanoNov 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.