How can i ignore plugin's cache files changes with the help of .gitignore file.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I have added a .gitignore file to ignore some plugin dll changes in my project. I am able to ignore Dll changes but still, I get lots of plugin's cache file changes. So is there any way to fix this thing.? any help would be great support for me.
5 years ago
You should be able to just add this to your .gitignore-file:
*.[Cc]ache


If the files are already tracked, you will need to remove them from the index with:
git rm --cached <file>
5 years ago
Thank you for your reply, I had added that line my .gitignore file and can you please tell me from which command I would be able to remove .cache files from a particular folder?
5 years ago
#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml
*.publishproj

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
!?*.[Cc]ache/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

# Database settings file
Settings.txt
src/packages/Comparision/BP.DC.Component.CompareDocs.XML

#Project file
src/Presentation/Nop.Web/Content/
src/.vs
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/web.config
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Views/PublicInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Scripts/jquery.nivo.slider.js
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Nop.Plugin.Widgets.NivoSlider.dll.config
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/logo.jpg
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Description.txt
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/light/loading.gif
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/light/light.css
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/light/bullets.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/light/arrows.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/default/loading.gif
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/default/default.css
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/default/bullets.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/default/arrows.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/dark/loading.gif
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/dark/dark.css
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/dark/bullets.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/dark/arrows.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/custom/loading.gif
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/custom/custom.css
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/custom/bullets.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/custom/arrows.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/bar/loading.gif
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/bar/bullets.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/bar/bar.css
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/themes/bar/arrows.png
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/sample-images/banner2.jpg
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/sample-images/banner1.jpg
/src/Presentation/Nop.Web/Plugins/Widgets.NivoSlider/Content/nivoslider/nivo-slider.css
/src/Presentation/Nop.Web/Plugins/Widgets.GoogleAnalytics/web.config
/src/Presentation/Nop.Web/Plugins/Widgets.GoogleAnalytics/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Widgets.GoogleAnalytics/Nop.Plugin.Widgets.GoogleAnalytics.dll.config
/src/Presentation/Nop.Web/Plugins/Widgets.GoogleAnalytics/logo.jpg
/src/Presentation/Nop.Web/Plugins/Widgets.GoogleAnalytics/Description.txt
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/web.config
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/Views/_FixedRate.cshtml
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/Views/_CountryStateZip.cshtml
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/Nop.Plugin.Tax.FixedOrByCountryStateZip.dll.config
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/logo.jpg
/src/Presentation/Nop.Web/Plugins/Tax.FixedOrByCountryStateZip/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.USPS/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.USPS/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.USPS/Nop.Plugin.Shipping.USPS.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.USPS/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.USPS/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.UPS/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.UPS/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.UPS/Nop.Plugin.Shipping.UPS.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.UPS/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.UPS/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/_FixedRate.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/_CreateOrUpdateRateByWeight.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/_ByWeight.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/EditRateByWeightPopup.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Views/AddRateByWeightPopup.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Nop.Plugin.Shipping.FixedOrByWeight.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.FixedOrByWeight/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.Fedex/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.Fedex/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.Fedex/Nop.Plugin.Shipping.Fedex.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.Fedex/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.Fedex/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.CanadaPost/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.CanadaPost/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.CanadaPost/Nop.Plugin.Shipping.CanadaPost.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.CanadaPost/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.CanadaPost/Description.txt
/src/Presentation/Nop.Web/Plugins/Shipping.AustraliaPost/web.config
/src/Presentation/Nop.Web/Plugins/Shipping.AustraliaPost/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Shipping.AustraliaPost/Nop.Plugin.Shipping.AustraliaPost.dll.config
/src/Presentation/Nop.Web/Plugins/Shipping.AustraliaPost/logo.jpg
/src/Presentation/Nop.Web/Plugins/Shipping.AustraliaPost/Description.txt
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/web.config
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Views/_CreateOrUpdate.cshtml
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Views/Edit.cshtml
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Views/Create.cshtml
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Nop.Plugin.Pickup.PickupInStore.dll.config
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/logo.png
/src/Presentation/Nop.Web/Plugins/Pickup.PickupInStore/Description.txt
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/web.config
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/Views/PaymentInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/Nop.Plugin.Payments.PurchaseOrder.dll.config
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/logo.jpg
/src/Presentation/Nop.Web/Plugins/Payments.PurchaseOrder/Description.txt
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/web.config
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/Views/PaymentInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/Nop.Plugin.Payments.PayPalStandard.dll.config
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/logo.jpg
/src/Presentation/Nop.Web/Plugins/Payments.PayPalStandard/Description.txt
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/web.config
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/Views/PaymentInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/Nop.Plugin.Payments.PayPalDirect.dll.config
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/logo.jpg
/src/Presentation/Nop.Web/Plugins/Payments.PayPalDirect/Description.txt
/src/Presentation/Nop.Web/Plugins/Payments.Manual/web.config
/src/Presentation/Nop.Web/Plugins/Payments.Manual/Views/PaymentInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.Manual/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.Manual/Nop.Plugin.Payments.Manual.dll.config
/src/Presentation/Nop.Web/Plugins/Payments.Manual/logo.jpg
/src/Presentation/Nop.Web/Plugins/Payments.Manual/Description.txt
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/web.config
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/Views/PaymentInfo.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/Nop.Plugin.Payments.CheckMoneyOrder.dll.config
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/logo.jpg
/src/Presentation/Nop.Web/Plugins/Payments.CheckMoneyOrder/Description.txt
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/web.config
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/Nop.Plugin.Feed.GoogleShopping.dll.config
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/logo.jpg
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/Description.txt
/src/Presentation/Nop.Web/Plugins/Feed.GoogleShopping/Content/styles.css
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/web.config
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Views/PublicInfo.cshtml
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Nop.Plugin.ExternalAuth.Facebook.dll.config
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/logo.jpg
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Description.txt
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Content/Images/facebook-signing.png
/src/Presentation/Nop.Web/Plugins/ExternalAuth.Facebook/Content/facebookstyles.css
/src/Presentation/Nop.Web/Plugins/ExchangeRate.EcbExchange/Nop.Plugin.ExchangeRate.EcbExchange.dll.config
/src/Presentation/Nop.Web/Plugins/ExchangeRate.EcbExchange/logo.jpg
/src/Presentation/Nop.Web/Plugins/ExchangeRate.EcbExchange/Description.txt
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/web.config
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/Views/ProductAddPopup.cshtml
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/Nop.Plugin.DiscountRules.HasOneProduct.dll.config
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/logo.jpg
/src/Presentation/Nop.Web/Plugins/DiscountRules.HasOneProduct/Description.txt
/src/Presentation/Nop.Web/Plugins/DiscountRules.CustomerRoles/web.config
/src/Presentation/Nop.Web/Plugins/DiscountRules.CustomerRoles/Views/Configure.cshtml
/src/Presentation/Nop.Web/Plugins/DiscountRules.CustomerRoles/Nop.Plugin.DiscountRules.CustomerRoles.dll.config
/src/Presentation/Nop.Web/Plugins/DiscountRules.CustomerRoles/logo.jpg
/src/Presentation/Nop.Web/Plugins/DiscountRules.CustomerRoles/Description.txt








----> this is my .gitignore file looks like...
5 years ago
Unfortunately I have no where to test this out at the moment, and don't want cause any work getting lost for you.

I think this might be what you are looking for if there are a lot of files needed to be removed oppose to remove them one by one: https://stackoverflow.com/a/49969162
5 years ago
Ok, thanks.!
4 years ago
Hi all
for any one still facing with this problem, here is my solution:
adding these lines to end of your .gitignore file:

# NOPCOMMERCE Ignore setting
*.[Cc]ache
/Presentation/Nop.Web/Plugins/*
!.gitkeep
/Presentation/Nop.Web/App_Data/plugins.json
/Presentation/Nop.Web/App_Data/dataSettings.json


Notes:
0. It's better to commit your changes before modifying .gitIgnore file
1. after adding, you should run below command from your command lines (such as GitBash):
   1.1. git rm -r --cached .
   1.2 git add .
2. Add a file (in most cases .gitkeep) to keep your /Presentation/Nop.Web/Plugins folder to prevent GIT to ignore it. ( by default git ignore empty folders)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.