kassie kassie - 1 year ago 154
Git Question

How to ignore existing file in Git?

I need to work on

locally and in Git, with different content and not to see working copy changes. Is this possible? Is so, how?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download