git - How to push on the production server only folder prepared for production? -
i have project under git version control. file structure following:
.git build server models controllers views site css js img .gitignore
in 'server' , 'site' folders resides source code unprepared production. use grunt preparing js css production (concat , min) put prepared files production in 'build' folder, after grunt this:
build server models controllers views site css // min js // min img // sprites
after 'git commit' , 'git push' remote production server. build folder git push source code ('server' , 'site' folders outside build folder) .that correct because git versioned files under application folder. need exclude pushing these folders pushing server.
how can that. thanks!
i thing have branch release. let's have branch production
it's own .gitignore
file push need.
the way did this
mkdir project cd project git init vi .gitigore type , save git commit -a -m "first commit" git checkout -b release vi .gitignore change content of file git commit -a -m "update release"
and that's it:-)
Comments
Post a Comment