Here’s a common scenario:
You’re working on a project (such as, but not necessarily, a web app) with other developers.
I decide we should use a certain open-sourced tool and add it to the project dependencies. Of course, I add it to our package manager, which is in source control. or
Tom realizes we can speed up our database queries by adding an index and denormalizing a bit of data. He adds a migration and checks it in.
In either scenario, when other developers git pull
or otherwise update their development environment, things are likely to break unless they run npm install
/ bundle
/ cocoapods chocolateygoodness
/ bower feathernest
or python manage.py migrate
/ bundle exec rake migrate
or whatever, and it’s not always obvious that this is the case. In fact, the other developer might not really be a developer at all, but perhaps a designer who is beautifying the cheezus out of our UI.
What I would really like is for every other developer, upon pull
ing the commit in question, to see something like this:
Updated!
Please note you MUST RUN this command before continuing.
(Stop your server first, if applicable)
$ ./magical_command_here --with-args
Alternatively, it would be amazing if running git status
could output something like:
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Migrations need to be run. Please execute `database_migration_command`
Who has solutions for this problem?