I need to work on file.txt
locally and in Git, with different content. I want Git not to tell me that there have been changes to that file.
Is this possible
Actually, you want --skip-worktree
, not --assume-unchanged
. Here's a good explanation why.
So git update-index --skip-worktree file.txt
TLDR; --assume-unchanged
is for performance, for files that won't change (like SDKs); --skip-worktree
is for files that exist on remote but that you want to make local (untracked) changes to.