I want to reorder the output of changed files in git commits so I've created a file called submodule/orderfile and configured diff.orderFile to point to that file.
Now many problems arise
- If I add the file to
.gitignore, the.gitignorewill be listed as modified - If I add the path
submodule/orderfileto.git/info/excludethe file still appears when I rungit status.
Either way, orderfile or .gitignore will be listed in git status. If I commit it to a branch it'll be removed when I switch to another branch. I don't want to push those files because I only use them locally.
I tried to run git update-index --assume-unchanged orderfile like stated here but it gives
fatal: Unable to mark file orderfile
More importantly even if I can manage to ignore the file, it'll be removed when I run git clean -xdf
So how can I told git to not track the file and still leave it as-is when I run git clean -xdf?