git add multiple files at once
How to add multiple files with different extensions to git all at one time...
You can add to git by explicitly listing each file with spaces as delimiters.
$ git add file-name-1.php file-name-2.js file-name-3.html …
The accepted answer is perfect for the OP’s specific case. But I got here—via Google—needing to add multiple files with different extensions. Posting here in case you miss this similar answer to a similar question.
Don't forget about interactive staging
Git interactive staging can also work wonders. To enter interactive staging (aka: adding, removing files):
$ git add -i
Maybe you have ignored your .o
file, check out your .gitignore file if it exists.
Otherwise, you can add all files just by:
$ git add .$ git commit -am "You message"
However, I dot think it's a good idea to trace the .o
files. It's binary file, you'll get these files whenever you do build. Ignore it is a good practice. :)