Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I restrict uploading certain file extension in github.com?

I starting a new project.

And me and my members use github to share code.

However, since we all use OSX, every folder each of us made has .DS_Store file.

Currently, we personally remove every .DS_Store file for every commit.

.DS_Store file does effect on code, but it is cause of conflict.

Is there handy way to restrict upload .DS_Store extension in github.com?

Thanks:D

like image 289
Juneyoung Oh Avatar asked May 16 '26 12:05

Juneyoung Oh


1 Answers

Add the following line to the .gitignore file at the root of the project:

.DS_Store

and commit the file. Then git will ignore those files.

See How can I Remove .DS_Store files from a Git repository? for how to remove the already committed .DS_Store files.

like image 113
JB Nizet Avatar answered May 19 '26 03:05

JB Nizet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!