Add and commit with a single command git

If we want to commit changes to git we write two commands in the terminal

git add .
git commit -m "message"

We can commit modified and deleted files changes with single command but this will not commit newly added files.

git commit -m "message" -a

OR

git commit -am "message"

Note that this will not include newly added files in the commit but only modified and deleted files

0 Comments
Write new article
Never leave your website again in search of code snippets by installing our chrome extension.