I recently integrated Git into my workflow, and I'm impressed with its capabilities. Not only is it a great VCS, it's running laps around FTP when pushing via ssh. I did run into a hitch this evening though, and I'm wondering if you fine folk can help me resolve it.
There are certain files in a project that I want to track, but don't want to push to production. Is there a way to push to a production server while excluding certain files from the repo? Two great examples:
- .less files don't need to be on a production server at all, but ABSOLUTELY should still be tracked
- As my local and production environments operate under different domains, the .htaccess files vary slightly. I still want to track these, as most of the rules are universal (and a pain to rewrite if lost) - but every time I push my local .htaccess live, it breaks my production environment and I have to fix the file by hand.
If possible, I'd like to keep everything under a single commit/push. My workflow is beautifully simple (except for this one thing), and adding extra steps or complicating factors would make me a sad Moose.
I don't know if it helps or not, but I'm using Tower to help manage everything.