GitHub: how to maintain two different versions of files different in repositories? -


should use .gitignore this?

i want maintain .htaccess file in local repository root directory of apache. .htaccess file different have in remote repository serves production server.

what should have "generic" .htaccess in github repository while other repositories may maintain own copies not uploaded of remote repositories? want file retained locally only.

this same case configuration files, instance, config.php contains database username/host/password/name may different among repositories.

thanks!

instead of ignoring files, create "branch" production server, merging "master" changes inside new branch before every deploy. in production branch, can commit configuration changes apply production environment.

this same strategy applies number of environments.

remember: never merge "production" branch "master", otherwise you'll end lot of problems config files. if need fix on production, use "bugfix" branch, starting on recent master commit merged production, merging production , master after work done.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -