git ignore whole folder excluding one file -
hey not work me:
vendor/* !vendor/predis/ vendor/predis/* !vendor/predis/predis vendor/predis/predis/* !vendor/predis/predis/lib vendor/predis/predis/lib/* !vendor/predis/predis/lib/predis vendor/predis/predis/lib/predis/* !vendor/predis/predis/lib/predis/profile vendor/predis/predis/lib/predis/profile/* !vendor/predis/predis/lib/predis/profile/serverversion24.php
where did make mistake?
what actual state of repository?
i believe want have just:
vendor/*
prior creating .gitignore
file, git add vendor/predis/predis/lib/predis/profile/serverversion24.php
. tracked.
after create .gitignore
file (or add mentioned line it) untracked files in vendor
directory ignored.
[edit] (correction after helpful comments, thanks!)
please keep in mind cannot ignore file tracked. if want that, need execute command git update-index --assume-unchanged
against files want ignore - change local repository, not shared. more details see how ignore files locally in git?.
Comments
Post a Comment