When I load my project into Github, it writes me "Commit is failed". I use bower and nodeJS, and I think that problems is about it, but I need to download these catalogs. What I need to do, or may be it can be done in another way?
How to load the project into Github
170 views Asked by Alexander Bondarenko At
3
There are 3 answers
1
On
You shouldn't commit node_modules
nor bower_components
. You should save your dependencies in a package.json
and bower.json
respectively and when cloning / checking out your project you should install your dependencies.
Add node_modules/
and bower_components/
to your .gitignore
(read here about editing your .gitignore) will make git "forget" that these directories exists.
This will also decrease the size of your project.
In order to create a package.json
if you're lacking but already have installed dependencies you can use npm shrinkwrap
.
These folders should be installed/populated via a dependency manager at install time (
npm
andbower
, respectively).You should create a
.gitignore
file in the root of your project as per this. This should be added to git so it is cloned with the repository on other machines too.There's also a webservice to generate
.gitignore
files, that's very comprehensive. This is fornode
andbower
: