Reputation: 1844
I git add .
everything to my repo, excluding files and directories (its a Rails 4+ one). I see a bunch of hidden files starting with a dot (some including an underscore) and I need to ignore them so they won't get pushed every time. I am working from an OSX Yosemite macbook. How do I do that? Is it simple regEx ^._*
?
Upvotes: 4
Views: 3882
Reputation: 2817
You can use the .*
to make him ignore all hidden files (starting with a dot).
So you can add to your [PROJECT]/.gitignore
file:
.*
!/.gitignore
The second line is here to keep the .gitignore
file.
Upvotes: 3