How can I make my .git repository listen only to a specific folder?

I currently have a project done in angular.js. I use gulp to minify the files and these are saved in the "_build" folder. I just want to upload the changes that are made in the "_build" folder. Keep in mind that when I generate the minification of the files, all the content inside "_build" is deleted.

How can I make my repository listen only to the "_build" folder?

enter image description here

1 answer

  • answered 2017-11-12 20:28 Yannoff

    You should use a .gitignore file inside your _build directory for this:

    # _build/.gitignore
    *
    !/.gitignore