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

Re: [PATCH] Fix 'git commit -a' in a newly initialized repository

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 22, 2007, 20:59 UTC
Message-ID
<Pine.LNX.4.63.0702222157000.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<alpine.LRH.0.82.0702221550290.27932@xanadu.home>
Hi,
On Thu, 22 Feb 2007, Nicolas Pitre wrote:
Show 10 quoted lines
> On Thu, 22 Feb 2007, Johannes Schindelin wrote:
> 
> > On Thu, 22 Feb 2007, Fredrik Kuivinen wrote:
> > 
> > > +		die 'nothing to commit (use "git add file1 file2" to include for commit)'
> > 
> > Would it not make more sense to tell the user about "git add ."?
> 
> Isn't what the patch does?  IMHO it looks just like the empty commit 
> message which is good.

I wanted to get at the "." thing. You know, when I start a project with git, there are usually some files there already. Provided I have a .gitignore there, I can just say "git add ." and be done.

But maybe that is _not_ common practice?
Show 7 quoted lines
> > Maybe together with a hint about .gitignore?
> > 
> > This error message is important. The most likely recipients are total 
> > git newsters, and we really should try to help them here.
> 
> Sure.  But to really help newsters it is better _not_ to talk about 
> .gitignore at all.  It certainly won't exist at that point anyway.
Hmm. That is a really good point. Hmmm. I think you're right.

Ciao, Dscho

Previous: Nicolas PitreNext: Nicolas Pitre
Message 4 of 9 in “Fix 'git commit -a' in a newly initialized repository”
  1. Fix 'git commit -a' in a newly initialized repositoryFredrik Kuivinen, Feb 22, 2007
  2. Johannes SchindelinFeb 22, 2007
  3. Nicolas PitreFeb 22, 2007
  4. Johannes SchindelinFeb 22, 2007
  5. Nicolas PitreFeb 22, 2007
  6. Johannes SchindelinFeb 22, 2007
  7. Junio C HamanoFeb 22, 2007
  8. Nicolas PitreFeb 23, 2007
  9. Junio C HamanoFeb 23, 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.