I had this project with a lot .c files in source directory,then I make the project, there is .o files inside of the project, I also want to push these files to repository,so instead of add each .o which is possible but...,how to add .o files easily?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
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.
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):
Putting aside the fact, that this is just a terrible idea, you can add them as any other file:
Of course instead of
git add *.o
you can usegit add */*.o
or evenfind -name *.o | while read x; do git add $x; done
Maybe you have ignored your
.o
file, check out your .gitignore file if it exists.Otherwise, you can add all files just by:
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. :)