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

Improve gitignore file comments and organization. #70

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

felddy
Copy link
Member

@felddy felddy commented Apr 8, 2021

🗣 Description

  • Add a comment describing what the files does.
  • Add sections to organize patterns.
  • Add a pattern that developers may use to quickly ignore files private to their development environment.

💭 Motivation and context

I'd like to propose a pattern that we can use to quickly ignore files in our development environments.
I've found that sometimes I have the need for a scratch file, or a configuration that I'm testing locally that I don't want to end up under version control.

I've been using *-mine.*

This allows me to have files like TODO-mine.md, docker-compose-mine.yml, or secrets-mine.json to live locally without fear of them making it into the repo.

A quick Google search didn't turn up any related proposals for something like this. We could also use *-ignoreme.*,*-nocommit.*, *-yourmom.*

Pros:

  • Easy to use
  • Short and meaningful
  • Shouldn't ignore files inadvertently: e.g., hexanitrodiphenylamine.py

Cons:

  • Could inadvertently ignore a file: e.g.,land-mine.yml
  • Doesn't work with extension-less files : e.g., LICENSE-mine

Alternatives:

  • I could just set this in my ~/.gitignore_global file, and then git config --global core.excludesFile ~/.gitignore_global
  • (I'll probably do that as well)

🧪 Testing

Works for me!

📷 Screenshots (if appropriate)

images

✅ Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

@felddy felddy added documentation This issue or pull request improves or adds to documentation blocked This issue or pull request is awaiting the outcome of another issue or pull request improvement This issue or pull request will add or improve functionality, maintainability, or ease of use labels Apr 8, 2021
@felddy felddy self-assigned this Apr 8, 2021
@felddy felddy requested a review from dav3r as a code owner April 8, 2021 17:20
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

I don't like this. It's too dangerous, since it could exclude something important.

This feels to me like a personal preference that should be handled in your local global git configuration. As a result I suggest closing this PR unmerged.

"It's a no from me dog."

@felddy
Copy link
Member Author

felddy commented Apr 8, 2021

I don't like this. It's too dangerous, since it could exclude something important.

This feels to me like a personal preference that should be handled in your local global git configuration. As a result I suggest closing this PR unmerged.

"It's a no from me dog."

Yes, It could exclude something important. But that is an easy fix. I'd rather err on the side of excluding something instead of including it.

I'm fine with setting this in my globals if there is no value in this for anyone.
I checked that my IDEs are smart enough to honor that.

I would like to merge the comments still since we do have people using the skeletons as their first interaction with git.
I do not want to abandon this PR entirely.

@hillaryj
Copy link
Contributor

hillaryj commented Apr 9, 2021

I also like the comments and would like to add them. I don't have a strong preference, but would err on the side of the convenience exclusions as a personal setting.

@jsf9k
Copy link
Member

jsf9k commented Apr 9, 2021

...would err on the side of the convenience exclusions as a personal setting.

👆

@felddy felddy requested a review from jsf9k April 12, 2021 14:36
* Add a comment describing what the files does.
* Add sections to organize patterns.
Copy link
Contributor

@hillaryj hillaryj left a comment

Choose a reason for hiding this comment

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

💬

Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

👻

@felddy felddy removed the blocked This issue or pull request is awaiting the outcome of another issue or pull request label Apr 26, 2021
@mcdonnnj mcdonnnj merged commit b0e7f01 into develop Jun 2, 2021
@mcdonnnj mcdonnnj deleted the improvement/gitignore_me branch June 2, 2021 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This issue or pull request improves or adds to documentation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Development

Successfully merging this pull request may close these issues.

5 participants