• Like
  • Save
Git hooks
Upcoming SlideShare
Loading in...5
×
 

Git hooks

on

  • 387 views

 

Statistics

Views

Total Views
387
Views on SlideShare
387
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Git hooks Git hooks Presentation Transcript

    • GIT HOOKS Error prevention via automation with Git By André Figueira
    • 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…
    • 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…
    • 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?
    • USEFUL RESOURCES  http://git-scm.com/docs/githooks.html