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

Re: git commit error on initial (the very first) commit

From
Junio C Hamano <junkio@cox.net>
Date
Jan 29, 2006, 21:08 UTC
Message-ID
<7v1wyqivx1.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060129181625.GA5540@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> writes:
Show 10 quoted lines
> On Sun, Jan 29, 2006 at 08:26:54PM +0300, Andrey Borzenkov wrote:
>> May be I do something wrong? What is correct procedure to initially import 
>> tree? git 1.1.4
>> 
>> {pts/0}% git init-db
>> defaulting to local storage area
>> {pts/0}% git add .
>> {pts/0}% git commit -m 'initial import'
>
> It needs to know which paths to update.

While I agree with you that individual developers should always say "commit -a" after testing their changes, I do not think that has much to do with Andrey's problem.

In a freshly created repository, "git add ." would register everything to the index file, and a "git commit" with or without "-a" that immediately follows "git add ." would commit what is in the index. Use of "-a" would not make a difference here.

Previous: J. Bruce FieldsNext: J. Bruce Fields
Message 3 of 5 in “git commit error on initial (the very first) commit”
  1. Andrey BorzenkovJan 29, 2006
  2. J. Bruce FieldsJan 29, 2006
  3. Junio C HamanoJan 29, 2006
  4. J. Bruce FieldsJan 29, 2006
  5. Junio C HamanoJan 29, 2006

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.