We can always use the .gitignore to exclude files which we do not want to check in into the repository. But sometimes the repository is only read only and you dun want your files to be appeared in the git status command. A simple solution to exclude those files in your current working copy. This could be done by editing the .git/info/exclude. Here is an example for my Drupal 8 installation.
.git/info/exclude
# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ sites/default/files sites/default/files/* sites/default/settings.php
Now your working copy should be clean.
Done =)
Reference: StackOverflow – Is there an ignore command for git like there is for svn?
great post
thanks for sharing your idea/work 😉
LikeLike
Thanks for your comment too~ =D
LikeLike