If you are using GIT for version control, there is way you can
ignore committing unnecessary files as per required.
Step 1. And to do that, please open a project_folder/.git/info/exclude file then update the file as per below example;
Step 3. Then clean the previous cached rules if any. Run below code each time you modified the exclude file
Step 1. And to do that, please open a project_folder/.git/info/exclude file then update the file as per below example;
# 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] # *~ # Your Main Application files (Example for CodeIgniter based application) # ###################### /.idea/* /assets/_upload/_articles/* // * mean exclude all the files /assets/_upload/_tmp/* !/assets/_upload/_articles/index.html // ! mean not exclude this file !/assets/_upload/_tmp/index.html /application/config/config.php /application/config/database.php /application/cache/* /application/cache/templates_compiled/* /application/CachedWebContent/* /application/logs/* /error_logBasic exclude rules for CodeIgniter based application as below; if you like you can modify them as per your needs.
# Compiled source # ################### *.com *.class *.dll *.exe *.o *.so # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.dbStep 2. Edit the file and Save it.
Step 3. Then clean the previous cached rules if any. Run below code each time you modified the exclude file
# git reset HEADStep 4.
# git add -- all // Add all the new folders or files if you have added any # git commit -am "You comments for commit" # git push #That's all you need to know! Enjoy!!!
No comments:
Post a Comment
Please post any queries and comments here.