I'm trying to automate an update process. The process is basically:
Everything is working as expected except step 6. I can commit the changes, but how do I commit any new files? I tried git add .
as I've read elsewhere but that doesn't catch all the new files in all the sub directories. Is there an easy way to do a "Add all new files"?
git add -A
will stage all modifications to the working tree. Add really means "include in the index" or "add changes to the index".
Take a look here . Perhaps you're interested in git add -u
or git add -A
.
您可以使用git add -A
如前所述或git add --all
命令git add --all
I know I'm late to the party here, but you can also do git -a -m "commit message here"
. This takes care of adding files as well as committing them in one command. I use this command pretty heavily.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.