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

Re: git commit -a -m is not working

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 28, 2015, 17:11 UTC
Message-ID
<20150928171132.GA11993@google.com>
In-Reply-To
<20150926185416.GA233088@vauxhall.crustytoothpaste.net>
Hi,
brian m. carlson wrote:
> On Sat, Sep 26, 2015 at 09:51:12PM +0300, Alex Radulescu wrote:
Show 13 quoted lines
>> Alex:testGit Alex$ git commit -a -m 'made a change'
>>
>> On branch v1.0
>>
>> Untracked files:
>>
>> new_branch.txt
>>
>> nothing added to commit but untracked files present
>
> git commit -a does not add untracked files.  Such files might be build
> by-products or such and you haven't told Git to track them, so it
> doesn't.

You can run "git add -N <files>" to tell Git to start caring about some new files (e.g., "git add -N ." to track them all).

Alternatively, you can run "git add <files>" to tell Git that the current content of those files is ready for commit (e.g., "git add ." before "git status" and "git commit" to commit everything).

More details are at http://jk.gs/gittutorial.html#_making_changes (also available by running "git help tutorial").

Thanks and hope that helps, Jonathan

Previous: brian m. carlsonNext: Alex Radulescu
Message 3 of 4 in “git commit -a -m is not working”
  1. Alex RadulescuSep 26, 2015
  2. brian m. carlsonSep 26, 2015
  3. Jonathan NiederSep 28, 2015
  4. Alex RadulescuSep 28, 2015

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.