Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I was wondering if anyone has a git ignore they have put together for Umbraco 9.
What should be be keeping in Git and what should we be ignoring with the new Umbraco 9 .Net Core version.
I am guessing there is already a git template floating around somewhere?
I haven't done a very extensive site yet, but I found if I just excluded the regular VS things, then Umbraco compiled stuff and the media directory, that seemed to do it for me.
For a basic site, this seemed to work fine - https://github.com/ProworksDevTeam/CG2021-HeadlessUnicore-Backend/blob/master/.gitignore
Noted. I also moved the models to a friendly folder too.
That's probably the best idea for Git too. That way you can check on the models without having to re-generate.
Note that I did update the ModelsBuilder config to generate code files for my models, and put them in a directory outside the umbraco folder, so you'd need to do that as well. See the config changes at https://github.com/ProworksDevTeam/CG2021-HeadlessUnicore-Backend/blob/master/appsettings.Development.json#L35
Please note that GitHub themselves have a repo for commonly used .gitignore files.
This is the one for Umbraco 8 (I imagine). If it were me, I'd want the version number appended to this file.
It would be great if a new version could be added specifically for Umbraco 9.
Yeah I have always been reluctant to use the ones stored within Git because of this.
Just posting here. I wrote a couple of articles which are a biut more complete. A few extra things not to include in Git and also some information on how to protect your connection strings and sensitive data.
What to exclude from Git
I am constantly building on to this as and when I notice something is not quite right.
Protecting connection strings
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted