Is -a in git commit -a equivalent to git add . -A?
Assuming i have the following aliases:
12 alias gita='git add . -A'
13 alias gits='clear; git status'
14 alias gitlog='git log --pretty=oneline --abbrev-commit'
15 alias commit='git commit -a '
16 alias check='gita;commit' <--------------------------
When i say check, is there any redundancy happening when i both add -A and commit -a
git add -Ais NOT equivalent to the-aflag ingit commit.git add -uis. It adds changes to tracked files (including rms).git add -Aalso brings in untracked files.Since
git add -Ais superset ofgit add -u, that is enough and you need not specify the-ain commit as well.Also,
if the path is not given, it is assumed to be.., so the.is superfluous as wellStarting git 2.0 (mid 2013), you will need to add the path, or
git add -Awould operate on the full working tree.See “Difference of “
git add -A” and “git add .”“.