This repository has been archived by the owner on Dec 18, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove obsolete junk from .gitignore #498
base: master
Are you sure you want to change the base?
Remove obsolete junk from .gitignore #498
Changes from all commits
8d1b53a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire section should not be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither should this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. These aren't "junk" or "outdated". They serve as extremely low-cost safe-guards against accidents. I don't know why you would ever take such a hardline approach to git ignores. They cost almost nothing to maintain, nothing to check and they prevent accidents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, but you could get rid of the top two and just leave
.a
and.lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are also useful safeguards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be left in. I believe Mac creates these automatically as hidden files to store folder attributes. Someone could literally commit this and have no idea it was even in the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are files automatically created by emacs in a lot of cases and if anyone has their emacs setup to generate them it's very easy to accidentally commit them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also done by some other editors too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, other editors do this too. Following your reasoning, we should add the files created by every editor out there into .gitignore... do you really think that's appropriate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I meant some editors create
~
files too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could have a slash in front though, for only ignoring at toplevel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, .gitignore is for files that should be ignored for everyone working on the project. Files that are created only by your own system should be ignored for you only:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, just the discoverability of this is so bad it has escaped me for over a decade as a good approach instead of listing them in project .gitignore. To the point it seems like something to note in some development docs of ours then, or we'll start getting PRs that try to add them all the time and we won't have anything to point them at as per instructions from our end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, could you make a pull request to add it to CONTRIBUTING.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot recall seeing a pull request where someone accidentally included a file generated by their editor. If that ever does happen, it is easy to catch in code review and tell the author to run
git config --global core.excludesFile
so I don't see what the problem is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think that this should be kept, I don't see any benefits of removing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping this here is a statement that these specific editors are preferred. I don't think that's appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But vcpkg_installed is also in the gitignore, so that means that I have to use vcpkg to install dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the contrary, if they were preferred, you'd let people ship relevant configurations of IDEs with them, rather than block them from doing so and "degrade" the integration with those specific IDEs, which is what we're doing here. If the
.gitignore
bore this sort of significance, it'd also be as if we were saying "we only prefer IDEs that leave junk in directories", which doesn't make too much sense.Some repositories (especially the ones concerning JavaScript code, from what I've seen) leave IDE-specific directories on purpose in order to allow people to come up with a development environment instantly. This explicitly disallows people from doing so.
We could have a comment explaining that these editors are not preferred instead, maybe?