Reputation: 6830
I have a question about Umbraco and Git. We have to work on Umbraco with 2 persons and we would like to use Git. I use GitHub for Windows to push my files to our github repository.
We just copy the umbraco folder to our repository? Or do we have to delete DLL's or .... ? Does someone has a tutorial about Umbraco and Git?
Thanks in advance! Niels
Upvotes: 1
Views: 1132
Reputation: 1815
If you're using a correct .gitignore
file, there is no need to delete files when committing your code.
Based on your use case, you could use the VisualStudio and Umbraco files from the GitHub gitignore collection. Just combine both files (in respective order) as .gitignore
file in the root of your repository.
Also, I would use the NuGet setup method, so upgrading should be a simple package update (see instructions). And don't forget the version specific upgrade instructions.
Upvotes: 0
Reputation: 10410
It depends on how you have the CMS set up and how you intend to expand on it. If you are simply editing the CMS as a standalone website, in other words you are not using Visual Studio to supplement the CMS with additional projects, then it should be perfectly safe to just commit almost the entire CMS structure to a repository.
However, you can always 'ignore' files and folders like the 'app_data/umbraco.config', 'app_data/preview/' and 'app_data/temp/'.
I use Visual Studio and convert my website folder into a VS MVC application with a csproj file. I will also remove all the DLLs and place them in a separate 'libraries' folder in the root of my repository trunk. I will then add references back into the MVC application. This has several benefits:
The application becomes compilable - allowing dependent projects and references to be checked/updated upon compile;
CI integration is better e.g. TeamCity could compile the site and check references, unit tests etc;
Libraries can have a central location and therefore easily referenced by additional projects
You can have a snapshot of the all libraries used by your solution at any one point;
Upvotes: 1
Reputation: 4092
I normally don't add CMS files and bin files to Git. I only add code files liek .aspx / .cs . / .js / .cshtml etc.
Whether you add or don't add the files is more of a personal preference. If you don't add them , your co-worker needs to do an install (or file-copy) of Umbraco himself. But if you add most of the CMS files, your repository grows a lot but your co-worker could only do a pull from git and should have an almost instant working environment. Either way, it is up to your personal preference.
Upvotes: 2