I've put two files in .git/info/exclude
but I can still see them with a git st
They are a config files, and I don't want to commit more.
I put them there because with --assume-unchanged
and --skip-worktree
I can not checkout to another branch.
If a file which already in the GIT repo, is excluded using .git/info/exclude
, you need to run git update-index --assume-unchanged <path-of-the-excluded-file>
to ignore further changes.
I can still see them with a git st
That means they are still versioned: you need to remove them from the index first:
git rm --cached -- yourConfigFile
git add .
git commit -m "Record deletion of yourConfigfile"
Then the git status
would ignore those files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With