Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding question for adding configuration file to .gitignore #13

Closed
wants to merge 2 commits into from

Conversation

spaceo
Copy link

@spaceo spaceo commented Sep 27, 2020

@xendk Added a prompt to the script asking if the configuration file should be added to .gitignore. Just a suggestion. First time with ruby for me so be gentle :)

@xendk
Copy link
Owner

xendk commented Sep 27, 2020

The Ruby's fine, though I feel the

      git_ignore_conf_file = STDIN.gets.strip != 'y' ? 'n' : 'y';
      if git_ignore_conf_file == 'y'

Could be expresed more rubyish as

    if STDIN.gets.strip =~ /^y(es)?/

My real beef is with the idea of adding user tool specific file to project .gitignore. I have .dce_container in my gits core.excludefile, together with the patterns for Emacs temp and backup files, so it's automatically ignored in all repos.

.gitignore should contain ignores for files produced directly by the tools of the project (temporary build files and the like), or files that's needed but shouldn't be committed (sites/default/settings.php for instance). IDE/editor and misc files produced by tools not mandated by the project, but chosen by the developer should be ignored by their own ignore file.

It's a point I'm still working on getting across the company. 😛

@spaceo
Copy link
Author

spaceo commented Sep 27, 2020

@xendk that is a very valid point. I agree in the global git ignore idea. And thx for the ruby tip. This was mostly driven by a personal interest in learning a bit of ruby. I will close this pr again.

@spaceo spaceo closed this Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants