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

commit all the untracked files prior adding them to stage using "git add"

From
Arup Rakshit <aruprakshit@rocketmail.com>
Date
May 17, 2014, 18:28 UTC
Message-ID
<1878681.dTqGrk8buZ@linux-wzza.site>
Here is the currently added files in my repository :

arup@linux-wzza:~/Rails/test_app> git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore # Gemfile # Gemfile.lock # README.rdoc # Rakefile # app/ # bin/ # config.ru # config/ # db/ # lib/ # log/ # public/ # test/ # vendor/ nothing added to commit but untracked files present (use "git add" to track)

Now I am looking for a way to add those in stage and commit also in a single line. So I did below :-

arup@linux-wzza:~/Rails/test_app> git commit -m "chapter 19 of Agile Web Development with Rails" -a # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore # Gemfile # Gemfile.lock # README.rdoc # Rakefile # app/ # bin/ # config.ru # config/ # db/ # lib/ # log/ # public/ # test/ # vendor/ nothing added to commit but untracked files present (use "git add" to track)

It did not work. Then using `git commit -h` told me, *-a* will work, for *tracked files*. Is there any way to add untracked files in stage, and commit in a single line ?

-- 
===============
Regards,
Arup Rakshit
Next: Tanay Abhra
Message 1 of 2 in “commit all the untracked files prior adding them to stage using "git add"”
  1. Arup RakshitMay 17, 2014
  2. Tanay AbhraMay 18, 2014

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.