{"thread":{"id":"36686","subject":"commit all the untracked files prior adding them to stage using \"git add\"","startedAt":"2014-05-17T18:28:50Z","lastAt":"2014-05-18T04:17:10Z","messageCount":2,"participants":["Arup Rakshit","Tanay Abhra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"242071","messageId":"1878681.dTqGrk8buZ@linux-wzza.site","threadId":"36686","inReplyTo":null,"subject":"commit all the untracked files prior adding them to stage using \"git add\"","fromName":"Arup Rakshit","fromEmail":"aruprakshit@rocketmail.com","sentAt":"2014-05-17T18:28:50Z","receivedAt":"2014-05-17T18:28:50Z","isPatch":false,"sender":{"key":"aruprakshit@rocketmail.com","avatar":"https://gravatar.com/avatar/a05a6142b0941fafb88c96b156982deb8e49e863ae7803d15c5147276fdeff92?d=mp&s=160"},"body":"Here is the currently added files in my repository :\n\narup@linux-wzza:~/Rails/test_app> git status\n# On branch master\n#\n# Initial commit\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       .gitignore\n#       Gemfile\n#       Gemfile.lock\n#       README.rdoc\n#       Rakefile\n#       app/\n#       bin/\n#       config.ru\n#       config/\n#       db/\n#       lib/\n#       log/\n#       public/\n#       test/\n#       vendor/\nnothing added to commit but untracked files present (use \"git add\" to track)\n\nNow I am looking for a way to add those in stage and commit also in a single \nline. So I did below :-\n\narup@linux-wzza:~/Rails/test_app> git commit -m \"chapter 19 of Agile Web \nDevelopment with Rails\" -a\n# On branch master\n#\n# Initial commit\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       .gitignore\n#       Gemfile\n#       Gemfile.lock\n#       README.rdoc\n#       Rakefile\n#       app/\n#       bin/\n#       config.ru\n#       config/\n#       db/\n#       lib/\n#       log/\n#       public/\n#       test/\n#       vendor/\nnothing added to commit but untracked files present (use \"git add\" to track)\n\nIt did not work. Then using `git commit -h` told me, *-a* will work, for \n*tracked files*. Is there any way to add untracked files in stage, and commit in \na single line ? \n\n\n-- \n===============\nRegards,\nArup Rakshit\n"},{"id":"242080","messageId":"loom.20140518T060536-509@post.gmane.org","threadId":"36686","inReplyTo":"1878681.dTqGrk8buZ@linux-wzza.site","subject":"Re: commit all the untracked files prior adding them to stage using \"git add\"","fromName":"Tanay Abhra","fromEmail":"tanayabh@gmail.com","sentAt":"2014-05-18T04:17:10Z","receivedAt":"2014-05-18T04:17:10Z","isPatch":false,"sender":{"key":"tanayabh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2097229?v=4"},"body":"Arup Rakshit <aruprakshit <at> rocketmail.com> writes:\n\n\n> Now I am looking for a way to add those in stage and commit also in a single \n> line. So I did below :-\n> \n> arup <at> linux-wzza:~/Rails/test_app> git commit -m \"chapter 19 of Agile Web \n> Development with Rails\" -a\n> # On branch master\n> #\n> # Initial commit\n> #\n> # Untracked files:\n> #   (use \"git add <file>...\" to include in what will be committed)\n> #\n> #       .gitignore\n> #       Gemfile\n> #       Gemfile.lock\n> #       README.rdoc\n> #       Rakefile\n> #       app/\n> #       bin/\n> #       config.ru\n> #       config/\n> #       db/\n> #       lib/\n> #       log/\n> #       public/\n> #       test/\n> #       vendor/\n> nothing added to commit but untracked files present (use \"git add\" to track)\n> \n> It did not work. Then using `git commit -h` told me, *-a* will work, for \n> *tracked files*. Is there any way to add untracked files in stage, and\ncommit in \n> a single line ? \n> \n\nHi,\n\ngit commit -a works for only modified or deleted files, but new files that\nyou haven't told git about are not affected. What you want is,\n\n$ git add -A && git commit -m \"your message\"\n\nwhere git add -A adds all new files to the staging area to track.\nA piece of advice, you seem to be new to git, try try.github.com/ for\nan interactive tutorial.\n\nCheers,\nTanay Abhra.\n"}]}