Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
Intermediate Capistrano
Next
Download to read offline and view in fullscreen.

Share

Git hooks

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Git hooks

  1. 1. GIT HOOKS Error prevention via automation with Git By André Figueira
  2. 2. THE HOOKS: CLIENT  Git hooks are scripts which get fired at certain events, e.g. push, commit, etc…  Different types of hooks, client & server  Client e.g.  Pre-commit  Additional checks…  Post-commit  Notifications…  Post-checkout  Modifications to environment…  Et Cetera…
  3. 3. THE HOOKS: SERVER  The cool stuff!  Can be simple or complex…  Types:  Pre-receive  Check to see what is being done and prevent it if needed, e.g. deletion of a file  Post-receive  Runs after the push process has finished  Can be used for deployment  Simple checkout, rsync, etc…  The sky is the limit…
  4. 4. BENEFITS OF USING HOOKS  Hooks can greatly increase our productivity  How?  Less time spent running additional diffs, checking to see if files are synced between FTP and Git  Single point of contact from inception to deployment without the middleman that is FTP  BLAME! AKA, visibility of all deployment to production, know every move anyone makes to production code  Less mistakes, automation in deployment means we are reducing the factor of human error  Easier to do continuous integration  Run anything off the back of deployment e.g.  Notify all developers by email  Automatically download dependencies on server which are not stored in Git, e.g. via composer  So much more! Questions?
  5. 5. USEFUL RESOURCES  http://git-scm.com/docs/githooks.html
  • yoursmartdesign

    Jan. 12, 2015

Views

Total views

566

On Slideshare

0

From embeds

0

Number of embeds

2

Actions

Downloads

7

Shares

0

Comments

0

Likes

1

×