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

Re: git commit -a -m is not working

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Sep 26, 2015, 18:54 UTC
Message-ID
<20150926185416.GA233088@vauxhall.crustytoothpaste.net>
In-Reply-To
<CAMWrOy7YoAofbzfW+dy=v1TRgWGe5OuZ8U2x+Q-XCKc1y_agRA@mail.gmail.com>
On Sat, Sep 26, 2015 at 09:51:12PM +0300, Alex Radulescu wrote:
Show 13 quoted lines
> Hi,
> 
> This command is not working. Any advice?
> 
> 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.

From git-commit(1):
  -a, --all
      Tell the command to automatically stage files that have been
      modified and deleted, but new files you have not told Git about
      are not affected.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Alex RadulescuNext: Jonathan Nieder
Message 2 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.