docs
docs copied to clipboard
Recommend default global gitignore file
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer
What part(s) of the article would you like to see updated?
The article recommends setting core.excludesfile
and adding an ignore file to the user’s home directory.
This is unnecessary since this change in Git 1.7.12 (August 2012), which made Git default to reading the file $HOME/.config/git/ignore
. Using this file is preferable as it avoids configuraiton and it’s the standard location for config, reducing bloat in the home directory.
Additional information
No response
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
@adamchainz Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
@adamchainz Thanks for opening this issue! I checked with the team, and this would be a great update for the docs. ✨
You or anyone else are welcome to submit a PR with this update 🔧
I’m too busy writing my own blog, relevant post.
Can I take this up?
@7ze You or anyone else is welcome to submit a PR with this fix. 💖
This issue is reserved for the MLH Fellowship program.
A stale label has been added to this issue becuase it has been open for 60 days with no activity. To keep this issue open, add a comment within 3 days.
not stale
Little query here. The default value of
core.excludefiles
is$XDG_CONFIG_HOME/git/ignore
and if this file is empty of not set, then it uses$HOME/.config/git/ignore
automatically.
However, in the article, it has been specified that the ignore files can be configured in Git globally.
Do we need to remove the configuration part as the default value is already set to $HOME/.config/git/ignore
.?