
Create a .gitignore file
Write and share Git ignore rules, check which patterns match, and keep exceptions working without accidentally treating inline comments as patterns.
Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Write and share Git ignore rules, check which patterns match, and keep exceptions working without accidentally treating inline comments as patterns.

Create missing parent directories with pathlib or os.makedirs, tolerate existing directories, and understand permissions, races, and path conflicts.

Combine keys and values with dict and zip, reject mismatched lengths, handle duplicate keys, and avoid unexpected keys when filling missing values.

Compare module-level instances, metaclass caching, and __new__ in Python, including repeated initialization, thread safety, and testing trade-offs.

Set a breakpoint in a pytest test or enter pdb on failure, inspect variables, and understand capture behavior and PYTHONBREAKPOINT.

Create application exceptions from Exception or a specific built-in type, preserve normal exception behavior, and expose structured error details.

Use del, pop, or popitem to remove dictionary entries, choose missing-key behavior, and delete several keys without mutating an active iteration.

Choose unlink, rmdir, or shutil.rmtree for the correct target, handle missing paths and symlinks, and understand when deletion bypasses the trash.

Delete local and remote branch refs separately, prune stale tracking refs, and check merge status and worktrees before removing a branch.

Extract a directory and its relevant history with git-filter-repo or subtree split, then publish the new repository and update its dependencies.

Use type for exact classes, isinstance for inheritance-aware checks, and issubclass for classes. Check supported operations directly when type is not the requirement.

Inspect fetch and push URLs, distinguish configured URLs from rewritten URLs, and understand why origin is not a permanent record of the original clone.