3 ms·
One shouldn't alias 'git add . && git commit' to 'git ac'. You should always check what you are about to commit with 'git status' and 'git diff'.
by daGrevis 12y ago
One shouldn't alias 'git add . && git commit' to 'git ac'. You should always check what you are about to commit with 'git status' and 'git diff'.
- conradev 12y agoAnother great tool to understand what you are committing is to add each chunk individually using `git add -p`.
- glitchdout 12y agoYep. The long form of that command is `git add --patch` and so I have it aliased as `git pa`.
- reledi 12y agoAlso very useful is to see what you are committing with `git commit --verbose` or `git commit -v`.
- epidemian 12y agoIf you have already checked that all unstaged changes should get included in the commit with `git st`, then i think doing `git ac` makes sense. I would, however, use `add -u` instead of `add .`, but that's mostly because i'm messy and its not unusual for me to have some local files which i don't want to commit -- e.g., one-off scripts, temporary SQL dumps, etc. YMMV.