Git + NPM + Local Connect

I’ve run into a major pain point when it comes to using connect and Git.

I set up Git in my theme folder on Local. Which creates the .git folder

I push my site to Flywheel which then ignores the .git which is ok, I see no reason to have git live on flywheel.

Pain Point: my node_modules folder gets uploaded to flywheel, which sucks since it’s huge and I really only need it while developing locally. anyway to ignore this? .localignore ?

Pain Point : When I need to pull the site from flywheel it overides all the files…including my .git…so bye bye git, and come the anoying process of having to clone again from origin.

Possible solution: have a way to not override local .git folder? even if the flywheel copy ends up changing my files…if I have my local git folder then i can always ignore the changes that the download caused.

+1 on this.

I would also love a way to tell local to ignore directories and not just files. I am having the same issue with my node_modules being pushed to the flywheel / live environment.

This not only uses up space on the hosting it also slows the transfer process.

Hey @ivanvilla and @joshua,

We’re prioritizing the .git folder issue in an upcoming update.

Regarding node_modules (and other files/folders to ignore), we’re currently working on the flow for this and hope to have a solution soon after the .git issue is addressed :smiley:

Thanks for the feedback!


This is also preventing me from using Connect at the moment. Can’t wait to get this addressed as this is a really neat feature.

1 Like

+1 on this.

Ignoring node_modules is a must have.

As a very iffy but working fix in the meantime, if you move your node_modules to the app directory it won’t push it, and you should still be able to use a lot of utilities.

Again, use this extremely iffy fix at your own caution. There’s lot of things that could go wrong. However, my gulp build works just fine like this as long as I’m not installing any more modules.

1 Like

Hey all,

We have a solution coming in 2.1.2 that handles both .git and node_modules. The update should be out today or tomorrow.

1 Like

2.1.2 is now available: Local by Flywheel 2.1.2

Let me know how it works for you all!


Hi @clay
I am using Local version 2.1.2 and am still experiencing issues with git. When pulling down from the Flywheel site to my Local it overrides the git folder. Is there anyway around this?

node_modules in a sub directory of my theme is still being pushed to Flywheel from Local. Does Local only ignore node_modules in a certain directory?

+1 for ignoring node_modules in theme. I also have a bower_components that I’d like to ignore.

@clay what would be the possibility of a .ignore file similar to git or even deployHQ?
This would allow users to specify any files in their theme, or even plugins that they didn’t want pushed live.


Hey @ryanh,

We certainly like the idea! If we don’t create a UI for this, a hidden ignore file of some sorts will probably be the route we take.

1 Like

Looks like node_modules is now ignored, I’m in a case where I would like it to not be ignored. Is this possible?

I push and pull and it would be great to have everything synced even if on the prod server the files are just taking up space. I’m open to suggestions for sure.

I’m on Win 10 with Local Version 2.2.4. If I pull from Flywheel my .git folder is removed from my theme folder. Is that the expected behaviour?

Hi @graemebenzie,

This is not the expected behavior. I just tested this on macOS and Windows and it worked properly on macOS (preserved the .git directory) but did not on Windows.

I’ve written up an issue in our tracker so we can get this resolved. Sorry for the trouble!