Jag
Jag

Reputation: 753

bin - to ignore or not to ignore

Just a quick question because it bugs me. :)

Many .gitignore templates for VS ignore the bin using something like [Bb]in/ and this is understandable if this is the 'output' of a compiled project.

Recently on an Umbraco project more DLLs have been added to the bin and now I have to go rummaging around looking for the right versions of the right DLL.

Now surely, assemblies in the BIN required by the project should be under version control? If there's a bug fix or we need a newer DLL from a provider (as has happened) surely it makes sense to commit this newer file along with relevant changes?

This way on a new machine (also happened recently) the repo can be checked out and will just work without having to go foraging the supporting files.

Am I being a muppet and just not getting it or am I missing a trick?

Upvotes: 2

Views: 175

Answers (1)

VonC
VonC

Reputation: 1324327

If you cannot get those dependencies another way through a package manager, as commented, then adding them seems to be the documented way:

The Umbraco "Visual Studio Setup" does include:

Now that you've added your own touch to your site, and thoroughly tested of course, you're ready to deploy to your Umbraco Cloud development site (the destination might vary depending on the plan you chose).

The key thing to remember is that you'll commit anything that is required by your site to the local git repository and will not commit source or project files.
That means you'll add .dll files to the git repository (which is found within the *.Web Project), which is typically something you wouldn't do with a source code repository.

That is detailed in the Umbraco "Git - what should be committed" page:

The cloned git repository from Umbraco Cloud comes with its own .gitignore so files that should NOT be committed are already handled.

As a rule of thumb all files that are required to run the Umbraco site should be committed to the git repository in the *.Web folder and deployed to Umbraco Cloud. This includes assemblies (*.dll).

Please note that its especially important to commit the files under the *.Web/data/ folder as these files are the serialized versions of the meta data (Document Types, Data Types, Media Types, Member Types, Member Groups, Templates and currently also Dictionary Items) for the site.

Upvotes: 1

Related Questions