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

[Merged by Bors] - Add note about global .gitignore to CONTRIBUTING.md — Instead of ignoring .DS_Store files created by macOS Finder #6499

Closed
wants to merge 3 commits into from

Conversation

coreh
Copy link
Contributor

@coreh coreh commented Nov 6, 2022

Objective

Finder in macOS creates hidden .DS_Store files containing metadata (for icon positioning, view mode, etc) whenever you browse a directory. There's no point in committing these to git, and they're a common git + macOS nuisance.

Solution

  • This PR adds .DS_Store files to .gitignore, improving the developer experience on macOS.
  • This PR adds a note to the CONTRIBUTING.md file teaching how to use global git ignore.

@mockersf
Copy link
Member

mockersf commented Nov 6, 2022

you should add that to your global gitignore, not to each project you'll contribute to

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Meta About the project itself and removed C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Nov 6, 2022
@alice-i-cecile
Copy link
Member

I agree with Francois here :)

@MrGVSV
Copy link
Member

MrGVSV commented Nov 6, 2022

you should add that to your global gitignore, not to each project you'll contribute to

I disagree. Why should Bevy define a .gitignore at all then?

We can leave this out if that's what people prefer but I don't see the harm in adding it haha

@mockersf
Copy link
Member

mockersf commented Nov 6, 2022

Why should Bevy define a .gitignore at all then?

for files to ignore that are specific to this project and that you don't want to ignore on all projects, like a Cargo.lock file, or files generated during tests. the local .gitignore file is also useful to ignore files from a project that have default values but that users may want to customise without committing them

I don't see the harm in adding it

There's no harm, it's just not the place to support every configuration people may have

@Vrixyz
Copy link
Member

Vrixyz commented Nov 6, 2022

TL;DR: I approve this addition.

Even though I tend to agree with @mockersf within a « trusted team », in an open source project I think it makes sense to add it:
Pros:

  • it helps newcomers and reviewers
  • Only 1 line

Cons:

  • platform specific, can (and should) be enabled globally on a machine.
  • Still 1 line, what if everyone starts adding their own specific edge case ignores..?

In my opinion the suggestive advantage balance is on the pros’ side 👍.

Current .gitignore also contains .vscode and .idea ; which are not machine-wide files, but independent developer experience files… in my opinion, if we want to be purist about our gitignore, we would want to set those ignores locally rather than from our project ( https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally )

But because a lot of people are using vscode or itellij/clion, it’s worth it to add them 👍 I would argue .DSStore is comparable to that :)

@mockersf
Copy link
Member

mockersf commented Nov 6, 2022

But because a lot of people are using vscode or itellij/clion, it’s worth it to add them

You're right, we should remove them 🥷

GitHub as a reference repo for .gitignore files. macOS specific files and editors are in the Global folder 😉 https://github.com/github/gitignore/tree/main/Global

If that's really an issue for people, I would prefer to add doc to the CONTRIBUTING.md, maybe just a link to https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer

@MrGVSV
Copy link
Member

MrGVSV commented Nov 6, 2022

If that's really an issue for people, I would prefer to add doc to the CONTRIBUTING.md, maybe just a link to https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer

I think this would be a nice compromise if we decide to not include this change. I didn't even know you could ignore files in git globally 😅

@alice-i-cecile alice-i-cecile added the X-Controversial There is active debate or serious implications around merging this PR label Nov 6, 2022
@coreh coreh changed the title Ignore .DS_Store files created by macOS Finder Add note about global .gitignore to CONTRIBUTING.md — Instead of ignoring .DS_Store files created by macOS Finder Nov 24, 2022
@coreh
Copy link
Contributor Author

coreh commented Nov 24, 2022

Pivoted the PR purpose 😅 It now adds a CONTRIBUTING.md note. That tip was personally helpful to me, since I don't remember being aware of or ever using global .gitignore before.

I believe that's a little less controversial, but if y'all want I can un-pivot the purpose of the PR, I don't have a strong preference either way now.

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation and removed X-Controversial There is active debate or serious implications around merging this PR labels Nov 24, 2022
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 25, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Nov 28, 2022
…ignoring `.DS_Store` files created by macOS Finder (#6499)

# Objective

Finder in macOS creates hidden `.DS_Store` files containing metadata (for icon positioning, view mode, etc) whenever you browse a directory. There's no point in committing these to git, and they're a common git + macOS nuisance.

## Solution

- ~~This PR adds `.DS_Store` files to `.gitignore`, improving the developer experience on macOS.~~
- This PR adds a note to the `CONTRIBUTING.md` file teaching how to use global git ignore.
@bors
Copy link
Contributor

bors bot commented Nov 28, 2022

Build failed:

@coreh
Copy link
Contributor Author

coreh commented Nov 30, 2022

Looks like this failed to build due to an issue in CI?

How can we re-run it?

Cannot add PPA: 'ppa:~oibaf/ubuntu/graphics-drivers'.
[11](https://github.com/bevyengine/bevy/actions/runs/3565094148/jobs/5989837932#step:5:12)
The user named '~oibaf' has no PPA named 'ubuntu/graphics-drivers'
[12](https://github.com/bevyengine/bevy/actions/runs/3565094148/jobs/5989837932#step:5:13)
Please choose from the following available PPAs:
[13](https://github.com/bevyengine/bevy/actions/runs/3565094148/jobs/5989837932#step:5:14)
 * 'gallium-nine':  Gallium Nine Test PPA
[14](https://github.com/bevyengine/bevy/actions/runs/3565094148/jobs/5989837932#step:5:15)
 * 'graphics-drivers':  Updated Open Graphics Drivers - since 2011!
[15](https://github.com/bevyengine/bevy/actions/runs/3565094148/jobs/5989837932#step:5:16)
 * 'test':  Testing PPA

@alice-i-cecile
Copy link
Member

bors retry

bors bot pushed a commit that referenced this pull request Nov 30, 2022
…ignoring `.DS_Store` files created by macOS Finder (#6499)

# Objective

Finder in macOS creates hidden `.DS_Store` files containing metadata (for icon positioning, view mode, etc) whenever you browse a directory. There's no point in committing these to git, and they're a common git + macOS nuisance.

## Solution

- ~~This PR adds `.DS_Store` files to `.gitignore`, improving the developer experience on macOS.~~
- This PR adds a note to the `CONTRIBUTING.md` file teaching how to use global git ignore.
@bors bors bot changed the title Add note about global .gitignore to CONTRIBUTING.md — Instead of ignoring .DS_Store files created by macOS Finder [Merged by Bors] - Add note about global .gitignore to CONTRIBUTING.md — Instead of ignoring .DS_Store files created by macOS Finder Nov 30, 2022
@bors bors bot closed this Nov 30, 2022
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
…ignoring `.DS_Store` files created by macOS Finder (bevyengine#6499)

# Objective

Finder in macOS creates hidden `.DS_Store` files containing metadata (for icon positioning, view mode, etc) whenever you browse a directory. There's no point in committing these to git, and they're a common git + macOS nuisance.

## Solution

- ~~This PR adds `.DS_Store` files to `.gitignore`, improving the developer experience on macOS.~~
- This PR adds a note to the `CONTRIBUTING.md` file teaching how to use global git ignore.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…ignoring `.DS_Store` files created by macOS Finder (bevyengine#6499)

# Objective

Finder in macOS creates hidden `.DS_Store` files containing metadata (for icon positioning, view mode, etc) whenever you browse a directory. There's no point in committing these to git, and they're a common git + macOS nuisance.

## Solution

- ~~This PR adds `.DS_Store` files to `.gitignore`, improving the developer experience on macOS.~~
- This PR adds a note to the `CONTRIBUTING.md` file teaching how to use global git ignore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Meta About the project itself C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants