Is there a way to just commit one file type extension from a folder?
问题 I have a folder with a lot of stuff and I would like just to commit ".c" extension files. Is there a command to do this or do I need to add each file name manually? 回答1: If you want to add all files with a specific file extension, all you have to do is specify it at the time you go to stage the files using a wildcard. git add *.c Here .c can be any extension you want. 回答2: For me, just git add *.c didn't work. I encountered fatal error like this: git add *.php The following paths are ignored