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

A terser .gitignore file. #6324

Merged
merged 2 commits into from
Jun 12, 2020
Merged

A terser .gitignore file. #6324

merged 2 commits into from
Jun 12, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jun 12, 2020

I trimmed .gitignore to the stuff that looked like it was still useful (at least, to me). Most of what's in there seemed like remnants of previous build systems (Buck, Stack, etc.). Other stuff includes editor- and OS-specific configuration files; I've left in what I recognized.

I've tried to categorize the files. This helps with keeping the file trim.

On my machine, this has exactly the same effect as the longer one. However, it's highly likely that I've overlooked something; let me know and I can add it back.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

I trimmed _.gitignore_ to the stuff that looked like it was still useful
(at least, to me). Most of what's in there seemed like remnants of
previous build systems (Buck, Stack, etc.). Other stuff includes
editor-specific configuration files, which you can add to your global
_.gitignore_ (`git config --global core.excludesfile ~/.gitignore`).

I left the macOS _.DS_Store_ files in, even though I believe they should
also go into your global, machine-specific _.gitignore_ file, because
eventually someone's going to check them in otherwise.

On my machine, this has exactly the same effect as the longer one.
However, it's highly likely that I've overlooked something; let me know
and I can add it back.

CHANGELOG_BEGIN
CHANGELOG_END
@ghost ghost requested review from cocreature, garyverhaegen-da and aherrmann-da June 12, 2020 12:41
Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not a huge fan of telling people to add stuff to their global gitignore. Yes you can do it and it might technically be the right thing to do but adding it here avoids committing it accidentally and doesn’t do any harm if you do have it in your global gitignore.

@ghost
Copy link
Author

ghost commented Jun 12, 2020

OK, which editors should we support? I see emacs and vim backup files in there, Ensime, Eclipse, and IntelliJ IDEA. However, there could be 10 more that I don't recognize.

Happy to add them back if we can identify the ones we care about. (And add in whatever was missing for those editors.)

@cocreature
Copy link
Contributor

I would keep all editor-specific stuff and only remove stuff that is explicitly obsolete (e.g. references to rattle, cabal files or stack).

@cocreature
Copy link
Contributor

If you don’t recognize something, it’s probably reasonable to remove it I guess.

@ghost
Copy link
Author

ghost commented Jun 12, 2020

I added back in editor files that I recognized. Hopefully that's good enough for now. We can always add more.

@ghost ghost requested a review from cocreature June 12, 2020 13:13
Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from the fact that Emacs should obviously get priority over Vim, thanks!

.gitignore Show resolved Hide resolved
I guess we really don't want people checking these files in by accident.
@ghost ghost force-pushed the shrink-gitignore branch from 95768ff to 8764a9e Compare June 12, 2020 13:17
@ghost ghost added the automerge label Jun 12, 2020
@mergify mergify bot merged commit 31d5fb7 into master Jun 12, 2020
@mergify mergify bot deleted the shrink-gitignore branch June 12, 2020 13:44
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