I have just started writing a web application.
I am using GIT for version control and I have git and web server in the same computer.
Application has 3 environments: dev, test and production
I want to use git hook after every commit to update dev, test or production application.
what is the best practice for this?
I need something like this:
- when I commit, dev must automatically be updated
- when commit message contains “test: ” in front of message – dev and test must be updated.
- when commit message contains “production: ” in front of message – production, dev and test must be updated.
Thanks!
I’ve just written a hook / mini bash script to solve this problem
It is my first bash script so.. please help to improve this 🙂