{"thread":{"id":"36992","subject":"Feature request: git commit -A","startedAt":"2014-06-24T19:01:19Z","lastAt":"2014-06-24T23:34:45Z","messageCount":2,"participants":["Aidan Feldman","David Turner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"244942","messageId":"CAPgiXS7AizvtVNWR4dPXZ6nUQh7ujrrRFmd2SAktsUB0pidFVw@mail.gmail.com","threadId":"36992","inReplyTo":null,"subject":"Feature request: git commit -A","fromName":"Aidan Feldman","fromEmail":"aidan.feldman@gmail.com","sentAt":"2014-06-24T19:01:19Z","receivedAt":"2014-06-24T19:01:19Z","isPatch":false,"sender":{"key":"aidan.feldman@gmail.com","avatar":null},"body":"Hi all-\nI work on the education team at GitHub and do a fair number of Git\nworkshops.  One thing that I've always found difficult to explain to\nnewbies is how the staging area works, and why it's useful.  As a\nhand-wave to simplify things, I usually have them use\n\ngit add -A\ngit commit -m \"...\"\n\nto not really have to worry about untracked vs. modified/removed files\naren't included with `git commit -a` or `git add .`.  I would like to\nadd a `-A` flag to the `commit` command, which effectively does a `git\nadd -A` before committing.\n\nI was trying to submit a patch myself, but couldn't even manage to\nfind where the various flags are defined :-)  Does the feature sound\nreasonable?  Mind pointing me in the right direction of where this\nwould be added?\n\nThanks!\n-Aidan Feldman\n"},{"id":"244951","messageId":"1403652885.22828.10.camel@stross","threadId":"36992","inReplyTo":"CAPgiXS7AizvtVNWR4dPXZ6nUQh7ujrrRFmd2SAktsUB0pidFVw@mail.gmail.com","subject":"Re: Feature request: git commit -A","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2014-06-24T23:34:45Z","receivedAt":"2014-06-24T23:34:45Z","isPatch":false,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"On Tue, 2014-06-24 at 15:01 -0400, Aidan Feldman wrote:\n> Hi all-\n> I work on the education team at GitHub and do a fair number of Git\n> workshops.  One thing that I've always found difficult to explain to\n> newbies is how the staging area works, and why it's useful.  As a\n> hand-wave to simplify things, I usually have them use\n> \n> git add -A\n> git commit -m \"...\"\n> \n> to not really have to worry about untracked vs. modified/removed files\n> aren't included with `git commit -a` or `git add .`.  I would like to\n> add a `-A` flag to the `commit` command, which effectively does a `git\n> add -A` before committing.\n> \n> I was trying to submit a patch myself, but couldn't even manage to\n> find where the various flags are defined :-)  Does the feature sound\n> reasonable?  Mind pointing me in the right direction of where this\n> would be added?\n\nLook at builtin/commit.c in the cmd_commit function.  You'll see:\n\t\tOPT_BOOL('a', \"all\", &all, N_(\"commit all changed files\")),\nJust add another one, \n\t\tOPT_BOOL('A', \"all-untracked\", &all_untracked, N_(\"commit all changed\nfiles as well as all non-excluded untracked files\")),\n\nThat said, I am mildly opposed to this feature because it will\ninevitably lead to cruft (and credentials) being checked into\nrepositories.  It's easier, but it's not simpler.\n"}]}