Ignoring local changes to lines in Git 0 ▲ Michael Welford 155 days ago · Tech · hide · Fediverse post As a special snowflake, one tends to want to make modification to tool configuration without messing with colleagues or make those changes a part of the project. For example, let’s say you have a pyrightconfig.json file in your project, slurped up by your editor’s Python Language Server Protocol (LSP): { "typeCheckingMode": "strict" }When what you need for your environment looks like: { "venvPath": ".", "venv": ".venv", "typeCheckingMode": "strict" }The usual suspects to get Git to ignore your additions include: Add the file name to .gitignore Add the file name to .git/info/exclude git update-index --skip-worktree <file> These “work” but then: Require updating project files (which means conversing with people! oh the humanity!) You run into trouble when you forget about the special accommodations (hello files in local docker images that get pushed) You miss out on changes to other parts of a file But! What if I told you that you could tell Git to ignore those specific lines or… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town