One git command for:
git add .
git commit -m 'update'
You can use the -a flag to combine add and commit in one command:
git commit -am 'update'
The -a flag automatically stages all modified and deleted files before committing.
Important note: This only works for files that are already tracked by Git. It won't add new/untracked files. If you need to include new files, you'll still need to run git add . first, or you can create a Git alias.
Creating a Git alias for the full workflow
If you want a single command that truly does git add . && git commit -m 'update', create an alias:
git config --global alias.ac '!git add . && git commit -m'
Then use it like:
git ac 'update'
Or for a fixed message:
git config --global alias.update '!git add . && git commit -m "update"'
Then just run:
git update
The ! prefix allows you to run shell commands within Git aliases.