Y
HN HRCB new | past | comments | ask | show | by right | domains | dashboard | about hrcb
+0.17 Git's Magic Files (nesbitt.io)
178 points by chmaynard 2 days ago | 50 comments on HN | Mild positive Editorial · vv3.4 · 2026-02-24
Article Heatmap
Preamble: ND — Preamble Preamble: No Data — Preamble P Article 1: ND — Freedom, Equality, Brotherhood Article 1: No Data — Freedom, Equality, Brotherhood 1 Article 2: ND — Non-Discrimination Article 2: No Data — Non-Discrimination 2 Article 3: ND — Life, Liberty, Security Article 3: No Data — Life, Liberty, Security 3 Article 4: ND — No Slavery Article 4: No Data — No Slavery 4 Article 5: ND — No Torture Article 5: No Data — No Torture 5 Article 6: ND — Legal Personhood Article 6: No Data — Legal Personhood 6 Article 7: ND — Equality Before Law Article 7: No Data — Equality Before Law 7 Article 8: ND — Right to Remedy Article 8: No Data — Right to Remedy 8 Article 9: ND — No Arbitrary Detention Article 9: No Data — No Arbitrary Detention 9 Article 10: ND — Fair Hearing Article 10: No Data — Fair Hearing 10 Article 11: ND — Presumption of Innocence Article 11: No Data — Presumption of Innocence 11 Article 12: ND — Privacy Article 12: No Data — Privacy 12 Article 13: ND — Freedom of Movement Article 13: No Data — Freedom of Movement 13 Article 14: ND — Asylum Article 14: No Data — Asylum 14 Article 15: ND — Nationality Article 15: No Data — Nationality 15 Article 16: ND — Marriage & Family Article 16: No Data — Marriage & Family 16 Article 17: ND — Property Article 17: No Data — Property 17 Article 18: ND — Freedom of Thought Article 18: No Data — Freedom of Thought 18 Article 19: +0.16 — Freedom of Expression 19 Article 20: ND — Assembly & Association Article 20: No Data — Assembly & Association 20 Article 21: ND — Political Participation Article 21: No Data — Political Participation 21 Article 22: ND — Social Security Article 22: No Data — Social Security 22 Article 23: +0.13 — Work & Equal Pay 23 Article 24: ND — Rest & Leisure Article 24: No Data — Rest & Leisure 24 Article 25: ND — Standard of Living Article 25: No Data — Standard of Living 25 Article 26: +0.21 — Education 26 Article 27: +0.18 — Cultural Participation 27 Article 28: ND — Social & International Order Article 28: No Data — Social & International Order 28 Article 29: ND — Duties to Community Article 29: No Data — Duties to Community 29 Article 30: ND — No Destruction of Rights Article 30: No Data — No Destruction of Rights 30
Negative Neutral Positive No Data
Aggregates
Weighted Mean +0.17 Unweighted Mean +0.17
Max +0.21 Article 26 Min +0.13 Article 23
Signal 4 No Data 27
Confidence 6% Volatility 0.03 (Low)
Negative 0 Channels E: 0.6 S: 0.4
SETL +0.12 Editorial-dominant
Evidence: High: 0 Medium: 3 Low: 1 No Data: 27
Theme Radar
Foundation Security Legal Privacy & Movement Personal Expression Economic & Social Cultural Order & Duties Foundation: 0.00 (0 articles) Security: 0.00 (0 articles) Legal: 0.00 (0 articles) Privacy & Movement: 0.00 (0 articles) Personal: 0.00 (0 articles) Expression: 0.16 (1 articles) Economic & Social: 0.13 (1 articles) Cultural: 0.20 (2 articles) Order & Duties: 0.00 (0 articles)
Domain Context Profile
Element Modifier Affects Note
Privacy
No privacy policy or data collection signals observable on provided content.
Terms of Service
No terms of service signals observable on provided content.
Accessibility
No accessibility statement or implementation signals observable on provided content.
Mission
No explicit mission or values statement observable on provided content.
Editorial Code
No editorial ethics or standards policy observable on provided content.
Ownership
Individual author blog; no organizational ownership signals observable.
Access Model
Content appears freely accessible; no paywall or subscription model evident.
Ad/Tracking
No advertising or tracking signals observable on provided content.
HN Discussion 15 top-level comments
paulddraper 2026-02-22 17:20 UTC link
> Global ignores are good for OS-specific files like .DS_Store or Thumbs.db that shouldn’t clutter every project’s .gitignore.

News to me and a lot of people.

I see a lot of .DS_Store in a lot of gitignore.

retrodaredevil 2026-02-22 18:15 UTC link
This is a well put together list. One thing that frustrates me is that not all tooling respects mailmap. IntelliJ has an open feature/bug request for integrating mailmap into its git functionality. Additionally, the .git-blame-ignore-revs is more of a convention because you still have to manually configure that to be the file name to use.
DHowett 2026-02-22 19:06 UTC link
.git-blame-ignore-revs, while great, unfortunately belongs in the “Other Conventions” section.

If you configure your git client to use it, git blame will fail in any repository in which one is not present.

masfuerte 2026-02-22 19:13 UTC link
> GitHub, GitLab, and Gitea all respect .gitignore and won’t show ignored files in the web UI

Is this right? These tools don't show ignored files because they aren't part of the repository. If a now-ignored file has made it into the repository, surely you want to see it?

chmaynard 2026-02-22 20:27 UTC link
For a deeper dive on git ignore files, see:

https://nesbitt.io/2026/02/12/the-many-flavors-of-ignore-fil...

semanticc 2026-02-22 20:31 UTC link
> GitHub’s contributor graphs use mailmap.

This is not true, .mailmap is [unfortunately] not supported by GitHub: https://github.com/orgs/community/discussions/22518

jakub_g 2026-02-22 21:00 UTC link
I'd like to emphasize the `.git/info/exclude`, which is a "repo-local gitignore", i.e. only for you and only for this repo.

Useful when you want to create a temporary file to help you e.g. with a bug investigation, and make sure it stays untouched while you switch branches, and to avoid accidentally committing it.

I have a shell alias like this:

    git-ignore-local () {
      echo "$1" >> .git/info/exclude
    }
and use it like `git-ignore-local myfile.ext`
Jenk 2026-02-22 21:39 UTC link
Since using jj I'm on the lookout for some kind of setting that will exclude the .jj folder from the repo _and_ any operation including git clean, without having to add it to the repo. I.e., make it completely invisible to git including `git clean -xdf`!

At the moment I'm making do with aliasing `git clean -e .jj`

mananaysiempre 2026-02-23 00:24 UTC link
> package-lock.json merge=ours

This strikes me as a bad idea. Which side of the merge is “ours” and which ond is “theirs” during merges or rebases is something of a crapshoot[1], so this kind of setting only makes sense when merge conflicts are only ever discovered and resolved by automatic tooling (e.g. the git-annex branch[2] in git-annex-enabled repos).

[1] https://stackoverflow.com/questions/25576415/what-is-the-pre...

[2] https://git-annex.branchable.com/internals/#index2h2

tenpa0000 2026-02-23 06:16 UTC link
.git/hooks is underrated. I have a pre-push hook that runs my test suite — annoying to set up the first time but I've probably avoided a dozen broken CI runs by now.
musicmatze 2026-02-23 06:54 UTC link
gitlint (linked in the article, https://jorisroovers.com/gitlint/) is a really cool project that we use extensively (and in CI) to ensure we do not accidentally merge "!fixup"/"!squash" commits into master.
chriscbr 2026-02-23 07:11 UTC link
The author also posted a follow up about forge-specific repository folders ("magic folders" I suppose): https://nesbitt.io/2026/02/22/forge-specific-repository-fold...
MajorBee 2026-02-23 07:18 UTC link
Only tangential, but I recently discovered that VS Code also picks up paths in `.ignore` to decided whether to include paths in search. I knew that `.gitignore` is automatically picked up, but was surprised when all of a sudden directories that weren't supposed to show up in file search started showing up -- it's because I had unignored them in `.ignore` for ripgrep. Makes sense I suppose.
ta8903 2026-02-23 07:24 UTC link
>global ignore file at ~/.config/git/ignore or wherever core.excludesFile points

Most mentions I see of `core.excludesFile` refer to it as a global, but it could also be a local file. I use it as a local file since for some projects I'm working on I end up having a set of scripts/logs/anything specific to the repository that I don't want to be in the `.gitignore`.

speleding 2026-02-23 13:33 UTC link
The article mentions .gitattributes but does not mention a super useful property you can put in that file: you can use it to specify that part of your repo should not end up on a production server. We have this line in our .gitattributes:

/test export-ignore

That means that when a "git export" happens from git to our production server it skips all test files. (In our case Capistrano does that, no additional configuration needed.) You never want test files on a production server and it saves disk space to boot. Normal usage is not affected, in development or testing you would always do a "git pull" or similar.

Score Breakdown
ND
Preamble Preamble

Content is technical documentation about git configuration files. No observable alignment or misalignment with UDHR preamble principles of human dignity, equality, or fundamental freedoms.

ND
Article 1 Freedom, Equality, Brotherhood

Article addresses equal rights and freedom. Content concerns git technical configuration with no observable signals regarding equal treatment, dignity, or non-discrimination.

ND
Article 2 Non-Discrimination

Article prohibits discrimination. Content is technical documentation; no observable signals of discriminatory practices, exclusion, or differential treatment.

ND
Article 3 Life, Liberty, Security

Article addresses right to life, liberty, and security. Content concerns git configuration with no observable signals addressing personal security, liberty, or life.

ND
Article 4 No Slavery

Article prohibits slavery. Content is technical documentation; no observable signals regarding forced labor or servitude.

ND
Article 5 No Torture

Article prohibits torture and inhuman treatment. Content concerns git technical configuration; no observable signals addressing torture, abuse, or cruel treatment.

ND
Article 6 Legal Personhood

Article addresses right to legal personhood. Content is technical documentation; no observable signals regarding legal status or personhood.

ND
Article 7 Equality Before Law

Article ensures equal protection under law. Content concerns git configuration; no observable signals regarding legal protection or equality before law.

ND
Article 8 Right to Remedy

Article addresses right to legal remedy. Content is technical documentation; no observable signals regarding access to justice or remedies.

ND
Article 9 No Arbitrary Detention

Article prohibits arbitrary arrest and detention. Content concerns git configuration files; no observable signals regarding arrest, detention, or arbitrariness.

ND
Article 10 Fair Hearing

Article ensures fair and public hearing. Content is technical documentation; no observable signals regarding judicial process or fair trial.

ND
Article 11 Presumption of Innocence

Article addresses criminal responsibility and presumption of innocence. Content concerns git technical configuration; no observable signals regarding criminal law or judicial proceedings.

ND
Article 12 Privacy

Article protects privacy, family, home, and correspondence. Content is technical documentation about git configuration; no observable signals regarding privacy protection or family matters.

ND
Article 13 Freedom of Movement

Article addresses freedom of movement and residence. Content concerns git configuration files; no observable signals regarding movement rights or residence.

ND
Article 14 Asylum

Article addresses asylum and protection from persecution. Content is technical documentation; no observable signals regarding asylum, refuge, or persecution.

ND
Article 15 Nationality

Article addresses right to nationality. Content concerns git configuration; no observable signals regarding nationality, citizenship, or national allegiance.

ND
Article 16 Marriage & Family

Article addresses marriage and family rights. Content is technical documentation about git files; no observable signals regarding marriage, family, or spousal relations.

ND
Article 17 Property

Article addresses right to property and against arbitrary deprivation. Content concerns git configuration; no observable signals regarding property rights or expropriation.

ND
Article 18 Freedom of Thought

Article addresses freedom of thought, conscience, and religion. Content is technical documentation; no observable signals regarding religious freedom, conscience, or belief.

+0.16
Article 19 Freedom of Expression
Medium F: Content facilitates information sharing through documentation of git configuration systems that enable collaborative development and transparent code management
Editorial
+0.20
Structural
+0.10
SETL
+0.14
Combined
ND
Context Modifier
ND

Article 19 protects freedom of opinion and expression, including seeking/receiving information. Content indirectly supports this by documenting tools (.gitignore, .gitattributes, .mailmap, etc.) that enable collaborative communication and transparency in software development. The discussion of how these files travel with code and affect how information is treated shows mild positive framing toward open communication practices. Structural support is minimal—content is informational only, not implementing systems that directly enable expression.

ND
Article 20 Assembly & Association

Article addresses freedom of peaceful assembly and association. Content is technical documentation about git configuration files; no observable signals regarding assembly, protest, or association rights.

ND
Article 21 Political Participation

Article addresses political participation and democratic governance. Content concerns git configuration; no observable signals regarding political rights, voting, or democratic participation.

ND
Article 22 Social Security

Article addresses right to social security and work-related protection. Content is technical documentation; no observable signals regarding employment rights, social security, or labor protections.

+0.13
Article 23 Work & Equal Pay
Low F: Documentation promotes equitable access to technical knowledge and tool configuration that developers use in work
Editorial
+0.15
Structural
+0.10
SETL
+0.09
Combined
ND
Context Modifier
ND

Article 23 protects work-related rights including fair wages, favorable conditions, and right to organize. Content provides technical documentation that enables developers to work effectively using git tools. The mention of standardizing configurations across teams, automating setup, and reducing developer friction shows mild indirect support for equitable work practices. However, content does not directly address labor rights, compensation, or organization.

ND
Article 24 Rest & Leisure

Article addresses right to rest and leisure. Content is technical documentation about git configuration; no observable signals regarding rest periods, working hours, or leisure time.

ND
Article 25 Standard of Living

Article addresses right to adequate standard of living including food, clothing, housing, medical care. Content concerns git configuration files; no observable signals regarding material welfare or health.

+0.21
Article 26 Education
Medium F: Content provides educational material about technical systems, democratizing access to specialized knowledge A: Advocacy for standardized, documented, accessible development practices
Editorial
+0.25
Structural
+0.15
SETL
+0.16
Combined
ND
Context Modifier
ND

Article 26 addresses right to education and development of human personality. Content is educational material that explains technical concepts in accessible prose, enabling readers to understand and use git configuration systems. The emphasis on documentation, standards, shared configurations, and reducing barriers (e.g., 'everyone working on the repo uses the same settings') shows mild positive framing toward equitable knowledge sharing and technical education. Structural support is moderate—content exists as freely accessible education.

+0.18
Article 27 Cultural Participation
Medium F: Content discusses attribution (.mailmap), protection of creative works (file attributes), and intellectual property considerations P: Documentation supports developers in protecting and managing their creative contributions
Editorial
+0.20
Structural
+0.15
SETL
+0.10
Combined
ND
Context Modifier
ND

Article 27 protects rights to participate in cultural/scientific life and share in benefits of intellectual property. Content discusses .mailmap for attributing authorship and .gitattributes for marking authorship of contributions, which directly relates to author attribution and credit. Discussion of language detection overrides and marking generated/vendored code shows awareness of intellectual property boundaries. However, content does not directly address copyright protection or moral rights.

ND
Article 28 Social & International Order

Article addresses right to social/international order that realizes rights in the Declaration. Content is technical documentation; no observable signals regarding systemic rights protections or international order.

ND
Article 29 Duties to Community

Article addresses duties to community and limitations on rights. Content concerns git configuration files; no observable signals regarding community responsibilities or limitations on freedoms.

ND
Article 30 No Destruction of Rights

Article prohibits interpreting the Declaration to destroy rights or freedoms. Content is technical documentation; no observable signals regarding misuse or destruction of rights.

About HRCB | By Right | HN Guidelines | HN FAQ | Source | UDHR
build fc56cf0+0q5s · 2026-02-25 01:32 UTC