简体   繁体   中英

How to git add Grunt-generated files to my Github repository?

I see that a lot of projects, eg, video.js , are now using Grunt.js to build source files.

My problem is that when I git clone a project into my repo, run grunt , and then git add/commit/push some changes to my repo, the Grunt-generated files don't get pushed.

There has to be a simple solution,right?

Build/compiled files generally don't belong in a repo. You would usually build your application as part of a post-deploy build script, or something similar.

You can control which files are added to a repo with the .gitignore file: https://help.github.com/articles/ignoring-files

If you really want to commit build files to your repo, check the .gitignore file in the root of your application and remove the relevant lines.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM