5 ms·
I do this if I forget to add .DS_Store to .gitignore when working with git repos: find . -name .*DS_Store -delete
by konsumer 12y ago
I do this if I forget to add .DS_Store to .gitignore when working with git repos: find . -name .*DS_Store -delete
- singlow 12y agoJust be careful. A coworker of mine did this recently and forgot the -name part. Accidentally deleted everything, including the .git directory. He sure wished he had pushed that day.
- manicdee 12y ago*that hour. Surely you don't cruise through to the end of a day without pushing at least once before lunch? :(
- jordigh 12y agoI commit often, rewrite mercilessly, and thus I push to the big server infrequently. I do push frequently between local machines and servers. Mercurial Evolve makes propagating these edited commits across my local servers quite nice. Anyways, besides the plug for hg, my point was that I would expect pushing could be a once-a-day kind of thing, whereas commits should be every five minutes. :-)
- singlow 12y agoI agree. Pushing too frequently means you can't rebase and reorganize your commits - unless you each use separate repos.
- manicdee 12y agogit config --global core.excludesfile ~/.config/git/ignore cat >> ~/.config/git/ignore .DS_Store .AppleDouble .LSOverride .AppleDB .AppleDesktop .apdisk .fseventsd .Trashes .Spotlight-V100 ._* Icon Network Trash Folder Temporary Items Icon
- arnehormann 12y agoyou have missed mkdir -p ~/.config/git
- xorcist 12y agoWhy not .* ? I can't think of a good reason to commit hidden files.
- kayoone 12y agoput stuff like this in your global gitignore and you will bever have to worry about these files again. Stuff like this does not belong in a projects gitignore anyway because it's system specific.