12 hours ago · Tech · 0 comments

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…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.