I have a file in a git repository that has a local change on it. I want to have git ignore the local change forever, but not the file. In particular,
As of Git 2.5 (July 2015), you can use git worktree:
git worktree add -b patch-1 ../patch-1
This is essentially just creating a branch, but it puts the new branch into a new folder alongside the parent repo. This is nice because you can do work on this branch, even without committing, then switch back to master with a clean working directory.