{"thread":{"id":"66878","subject":"Branch Awareness","startedAt":"2026-11-19T09:54:02Z","lastAt":"2026-11-21T02:38:55Z","messageCount":3,"participants":["Jordan K","謝晉凡 Hsieh Chin Fan","Ben Knoble"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"558810","messageId":"CAA8YNQAsyUe275DLPRnB4dym5aq9ZyemA39u+HJciKzat5tNQA@mail.gmail.com","threadId":"66878","inReplyTo":null,"subject":"Branch Awareness","fromName":"Jordan K","fromEmail":"jordankadish93@gmail.com","sentAt":"2026-11-19T09:54:02Z","receivedAt":"2026-11-19T09:54:02Z","isPatch":false,"sender":{"key":"jordankadish93@gmail.com","avatar":null},"body":"I have a situation at my current workplace that led me to consider this feature:\n\nWe crudely pass around a `settings.py` file that doesn't match the one\nstored in our `main` branch, as many workplaces do.\n\nFeature request:\nAllow `.gitignore` branch awareness, so that changes/the existence of\na specific file are ignored in all branches that are not\n`specific-branch-name` or ignore the file in ONLY\n`specific-branch-name`\n\nSor of like a whitelist/blacklist flag (there should be an option to\nuse either).\n\nI think this is an impactful feature, as many git users have\nsituations where they need to ignore Django migration files, local\nsettings files, compiled binary changes, etc etc but those files _do_\nneed to exist and be included on the staging/main branches\n\nRegards\nJordan Kadish\n\n"},{"id":"558844","messageId":"av7rT2dKR1zguMeN@dell","threadId":"66878","inReplyTo":"CAA8YNQAsyUe275DLPRnB4dym5aq9ZyemA39u+HJciKzat5tNQA@mail.gmail.com","subject":"Re: Branch Awareness","fromName":"謝晉凡 Hsieh Chin Fan","fromEmail":"kernel@topo.tw","sentAt":"2026-11-19T12:27:59Z","receivedAt":"2026-11-19T12:27:59Z","isPatch":false,"sender":{"key":"kernel@topo.tw","avatar":null},"body":".gitignore is itself a tracked file. A merge from feature into main\nwould also merge the branch rules. This makes the rules hard to reason\nabout.\n\n\nWhat Git already provides based on .git/config:\n\n# .git/config\n[includeIf \"onbranch:feature/**\"]\n    path = .git/feature.config\n\n# .git/feature.config\n[core]\n    excludesFile = .git/feature.ignore    # contains: settings.py\n\n$ git switch main        ; git status -s   ->  ?? settings.py\n$ git switch feature/x   ; git status -s   ->  (nothing)\n\n\nOn Thu, Nov 19, 2026 at 11:54:02AM +0200, Jordan K wrote:\n>I have a situation at my current workplace that led me to consider this feature:\n>\n>We crudely pass around a `settings.py` file that doesn't match the one\n>stored in our `main` branch, as many workplaces do.\n>\n>Feature request:\n>Allow `.gitignore` branch awareness, so that changes/the existence of\n>a specific file are ignored in all branches that are not\n>`specific-branch-name` or ignore the file in ONLY\n>`specific-branch-name`\n>\n>Sor of like a whitelist/blacklist flag (there should be an option to\n>use either).\n>\n>I think this is an impactful feature, as many git users have\n>situations where they need to ignore Django migration files, local\n>settings files, compiled binary changes, etc etc but those files _do_\n>need to exist and be included on the staging/main branches\n>\n>Regards\n>Jordan Kadish\n>\n\n-- \n謝晉凡 Hsieh Chin Fan\nsite: https://topo.tw/about\ntimezone: GMT-4\n\n"},{"id":"559016","messageId":"71943758-1A3B-44F5-9BDA-233F16AC41C7@gmail.com","threadId":"66878","inReplyTo":"CAA8YNQAsyUe275DLPRnB4dym5aq9ZyemA39u+HJciKzat5tNQA@mail.gmail.com","subject":"Re: Branch Awareness","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-11-21T02:38:55Z","receivedAt":"2026-11-21T02:38:55Z","isPatch":false,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 19 nov. 2026 à 04:54, Jordan K <jordankadish93@gmail.com> a écrit :\n> \n> ﻿I have a situation at my current workplace that led me to consider this feature:\n> \n> We crudely pass around a `settings.py` file that doesn't match the one\n> stored in our `main` branch, as many workplaces do.\n\nWe sometimes carry « .env.example » that folks should modify\ninto « .env », which is ignored.\n"}]}