Re: Why doesn't git commit -a track new files
On Thu, Feb 24, 2011 at 11:22, Marco <netuse@lavabit.com> wrote:
Show 10 quoted lines
> I'm new to git and a bit confused about how some commands work.
>
> git add . -- Adds everything *but* deleted files
> git add -A -- Adds everything
> git commit -a -m "whatever" -- Commits everything *but* new files
>
> I don't understand why there's not switch (is there?) for commit to commit new
> and deleted files, like -A for git add? Is the only thing to do this sth like
>
> git add -A && git commit -m "Message"
You mean commit things you deleted, and untracked files?
That's a good question actually. It would be useful in some cases.
I've scripted around that a few times, maybe a switch for that would be useful.