site banner

Small-Scale Question Sunday for November 23, 2025

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

2
Jump in the discussion.

No email address required.

  1. IIRC the only high-level git commands that will remove untracked changes are clean, checkout, reset, and restore. You should be able to avoid this by not using them: every usage of checkout can be replaced by another command, and the others are specifically for discarding changes.
  2. Set push.autoSetupRemote to true. This will automatically create remote tracking branches on push. If you run push, pull, or fetch with no arguments they will automatically use your single origin.
  3. Use status --ignore-submodules=dirty. There's also the config option submodule.<name>.ignore=dirty, but that needs to be set for each submodule. You can make that status command an alias if you don't want to type it out every time.
  4. For existing files, you can do commit -- file1 file2 .... You still need to explicitly stage any newly created files, and it won't work during merges.
  5. In your git attributes file, put * merge=binary. If both branches have changes to a file, git will not modify the file, but will print an error saying there was a conflict and put it in the "unmerged paths" section of the status.