Git: Add only changed files
2022-09-29 (updated 2025-10-25)Notes | 1 min read
#git
Sometimes you may want to commit only the files you have changed and not any newly created files,
this can easily be achieved by this command: git commit -a
From the git manpage:
OPTIONS
-a, --all
Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.