I have to find a solution which ignore existing files like assume-unchanged but more dynamic.
I want:
- When I do
git status
,git diff
,git add
, etc., it just behave like there's no such a directory. (likeassume-unchanged
) - When I do
git pull
,git rebase
,git reset
,git checkout
, etc., it just behave like there's no such a directory. - Even when I add any new file into that folder, it must still be a ghost. (what
assume-unchanged
seems cannot do) - It's read-only so I don't have to consider about
add
,commit
,push
, etc.
Does anyone can help? Thanks a lot!
P.S. Some more details. Why I have to do this is because in my project they did check-in node_modules
directory into the repository. If you did used msysgit with a node project on Windows, you may know the "File name too long" problem...
So I want to totally ban the node_modules
in the repository and build my own one. I don't need to check-in any code so I won't consider about how to check-in my changes.