4 ms·
> Why does git not automatically ignore that?! Why doesn't Git automatically ignore desktop.ini? .desktop? __pycache__? In my experience, people end up creatin
by nyanpasu64 6y ago
> Why does git not automatically ignore that?!
Why doesn't Git automatically ignore desktop.ini? .desktop? __pycache__? In my experience, people end up creating bespoke .gitignore files for each project and sometimes shared online, or systemwide. I don't know if Git should make it global.
- skyzyx 6y agoJust add it to `~/.gitignore` and be done with it. Yeah haven’t worried about this in 10 years.
- manquer 6y agoThat approach works for one person or like minded dev teams perhaps. it fails in many teams, they do not care or a junior dev does not know. Many folks don't setup proper dotenv especially designers. Unless added to the project .gitignore file it is going to be added to the project sooner or later.
- hnarayanan 6y agoIt is easy to explain and help someone with this. :)
- manquer 6y agoIs it just me or nobody actually have problems working with non technical folks on git ? Getting a team of designers, content writers, marketing folks to use anything beyond their daily tools over a period of time is hard. I had the marketing team run a git managed, asset pipeline ,CI deployed Hugo static site via a CDN for three years, with great performance and high availability for three years, now we run hubspot. Once the initial team moved on, It was next to impossible to hire people willing to work on that stack , typically new guys will know Wordpress or hubspot etc, my TAs had frustrating time sourcing, I finally had to give up . Administrative Config in yaml/JSON files in a git repo sounded a nice idea , git gave version history rollback, audit log, branch/env, CI driven deployment all sounded great. Same problem typical operation folks are not used to this , they want a nice UI , and keep clicking and rather than do a grep/Sed replace in a jiffy. People just like different ways of working , it is hard for me to think graphically like a designer , I can understand that it can be hard for someone to think in text , it is better we give them tools that are comfortable with and fight other battles
- dragonwriter 6y ago> it fails in many teams, they do not care or a junior dev does not know If your team doesn’t care, by definition they don’t see it as a problem, so it only doesn’t work in the sense that they have decided hat they don’t need a solution. If your team cares but your junior devs don't know, you need to work on your standard practices documentation and onboarding procedures. “Use this default baseline .gitignore" is not a very arduous level of standardization that is hard to instill in new juniors.
- raverbashing 6y agoOr even better, XCode, Brew, and other services that have git can set it globally when git is installed. They know about MacOS after all
- bbx 6y agoGenius. Never thought about doing this.
- nyanpasu64 6y agoAdding to `~/.gitignore` is not enough. You need to tell Git to use it via `git config --global core.excludesfile ~/.gitignore` or similar.
- URSpider94 6y agoIf Git started not committing some files in a directory without user input, based on conventions of an OS or programming language that you might not be using, that would seem like quite the ad-hoc side-effect. I would definitely vote for a way to incorporate sane .gitignore settings per-OS or per-language, but still make it opt-in.
- HeWhoLurksLate 6y agoIs it not normal to have a repo or something somewhere just for your starting "boilerplate"? Whenever I switch computers, one of the very first things I do is copy over my bindings in CAD so that I don't have to relearn / figure them out again. I don't see why it'd be so hard to just store your own somewhere, and use it over and over again.
- nyanpasu64 6y ago- I used to setup zsh Git aliases based on zprezto but with some of my own tacked onto it. But you can't install zprezto on Windows Git (which uses bash, not zsh). And I switched to fish on Linux, so I lost my aliases there too. - Different programming languages have different files to ignore. I hop between many languages. - It might be a bit weird for multiple repos to have the same root commits. Not sure.
- gield 6y agoI much prefer it to be opt-in rather than opt-out. For any git project I start, I always visit https://gitignore.io https://gitignore.io.
- tuananh 6y agozsh has `gi` command which you can do like this gi macos node > .gitignore