docs icon indicating copy to clipboard operation
docs copied to clipboard

Recommend default global gitignore file

Open adamchainz opened this issue 2 years ago • 11 comments

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

adamchainz avatar Nov 06 '22 10:11 adamchainz

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.

welcome[bot] avatar Nov 06 '22 10:11 welcome[bot]

@adamchainz Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Nov 07 '22 14:11 cmwilson21

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:

github-actions[bot] avatar Nov 29 '22 20:11 github-actions[bot]

@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 🔧

cmwilson21 avatar Dec 02 '22 17:12 cmwilson21

I’m too busy writing my own blog, relevant post.

adamchainz avatar Dec 03 '22 16:12 adamchainz

Can I take this up?

7ze avatar Dec 16 '22 08:12 7ze

@7ze You or anyone else is welcome to submit a PR with this fix. 💖

cmwilson21 avatar Dec 16 '22 14:12 cmwilson21

This issue is reserved for the MLH Fellowship program.

cmwilson21 avatar Jan 09 '23 16:01 cmwilson21

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.

github-actions[bot] avatar Apr 08 '23 16:04 github-actions[bot]

not stale

adamchainz avatar Apr 11 '23 15:04 adamchainz

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.?

codewithdev avatar Jun 24 '23 07:06 codewithdev