Markus Hayner
Markus Hayner

Reputation: 2959

How to add in git ignore files with ._ in front of the file name?

My external HDD is creating some files with ._ in front of the file name like Podfile and ._Podfile and I would like to know if is a way to ignore those files form pushing to GitHub

Thanks

Upvotes: 1

Views: 941

Answers (1)

caramba
caramba

Reputation: 22490

You can just add it with the dot just add:

._Podfile

to your .gitignore

if you want to ignore all files starting with ._ you can add ._* to your .gitignore

But because it is only your HDD creating those ._Podfiles you could also add

._Podfile

to your "global git ignore" read more about global git ignore file here: https://stackoverflow.com/a/7335487/2008111

With the global git ignore you are saying to ignore it for every git project on your system! But without committing it to the project. Which in my opinion in this case is where it belongs.

Upvotes: 2

Related Questions