Our git repository doesn't allow zip files

Vote:
 

I installed the following nuget package: EpiServer.Marketing.Testing

This places a zip file with 172 KB in: C:\EPiServer\project-episerver-backend\Project\Project.Site\modules\_protected\EPiServer.Marketing.Testing

However when I try to push the changes to our Atlassian hosted git bitbucket the Control Freak rules do not allow zip files.

Is there an alternative way to install such a nuget package? Such as unzipping it and placing the contents somewhere?

And if yes, does this break any future automatic updating of this package?

#226287
Aug 10, 2020 8:48
Vote:
 

Not that I'm aware of. I usually check in those addon zip files to make it easy to get project up n running. 

The drawback is of course large files in GIT which is...frowned upon. But no rules without exceptions right!? :)

#226288
Aug 10, 2020 9:29
Vote:
 

You could skip the whole _modules folder from Git.

But everyone who downloads the repo from scratch, needs to force-install the NuGet packages. This way all the zip files will be placed in the _modules folder.

#226294
Aug 10, 2020 13:34
Vote:
 

Second what Stefan is saying. You would need to run

Update-package -reinstall

to make sure packages are reinstalled and files copied. 

#226298
Aug 10, 2020 15:06
EpiNewbie - Aug 11, 2020 12:00
Thanks, stupid question but is this a git command or where do I enter that command?
Quan Mai - Aug 12, 2020 7:39
Visual Studio Package Manager Console
Quan Mai - Aug 12, 2020 7:39
Visual Studio Package Manager Console
EpiNewbie - Aug 12, 2020 8:03
Thanks I eventually figured it out. Will this command really re-install all the nuget packages or only the ones with missing files? I am asking because it would be interesting to know for anyone joining our development team in the future.
Quan Mai - Aug 16, 2020 7:19
it will reinstall all packages with the defined versions
Vote:
 

I'm guessing you're the same person who posted this question on StackOverflow: 
https://stackoverflow.com/questions/63336727/git-error-message-filetype-not-allowed-or-file-too-large

#226305
Edited, Aug 10, 2020 17:59
Vote:
 

Thank you all for the feedback. As we are several developers in the team, and already the _modules folder is checked in, I would be worried/reluctant to take it out of our Git repo after the fact. My first plan of action will be to check with our Bitbucket admins whether they can change the Control Freak settings for our project. 

#226345
Aug 11, 2020 7:23
Vote:
 

I have since spoken to other devs in the team, and the general consensus is to have git ignore the modules folder and its contents as has been suggested here.

What I am unsure about is the syntax in the gitignore file.

I tried adding this to the gitignore file but it didnt seem to have any effect: modules/

Do I need to have the relative path to the gitignore file? So project.site/modules/ ?

#226348
Aug 11, 2020 8:56
Stefan Holm Olsen - Aug 11, 2020 10:06
Using the Episerver Foundation website as a sample, you would need to add this relative path to you .gitignore file: src/Foundation/_modules/
But you need to adjust the path according to your solution structure.
EpiNewbie - Aug 11, 2020 11:27
Thank you, our folder structure is as follows: Project/Project.Site/modules

So if I understood you correctly I would put the following in our .gitignore: "src/Project/Project.Site/modules" ?
Stefan Holm Olsen - Aug 11, 2020 11:31
No, if the “Project” folder is in the Git root, remove the “src” part.
EpiNewbie - Aug 11, 2020 11:43
Thanks, upon some further testing I got it to work simply by adding "modules/" to the .gitignore file.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.