For the git users

R_JR_J Cheerleader & TroubleshooterMunich Moderator

Here's an article I've found today. It is about git hooks, something I've never heard about before, but which sounds really useful if you have a workflow involving git: http://davidwalsh.name/git-hooks


KasperhgtonightUnderDog

Comments

  • hgtonighthgtonight ∞ · New Moderator

    David Walsh, and his blog, is pretty great. I have learned plenty and his demos are good references.

    I actually use a post-receive hook to checkout the master branch of a private repo to my web folder. This lets me test and track changes locally. Also gives me an easy way to roll back changes if I screw something up (which happens more than I care to admit:).

    Good link, would read again.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    KasperUnderDog
  • businessdadbusinessdad Stealth contributor MVP

    @hgtonight said:
    David Walsh, and his blog, is pretty great. I have learned plenty and his demos are good references.

    Never heard of him, I'll have to check if I missed something.

    I actually use a post-receive hook to checkout the master branch of a private repo to my web folder. This lets me test and track changes locally. Also gives me an easy way to roll back changes if I screw something up (which happens more than I care to admit:).

    That's a good approach. I use a similar one to deploy to production, as it's much faster and safer than FTP or manual file copy. Git is definitely powerful, and it's good that one can use a fraction of it, if he likes, and still be very productive.

    Kasper
  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Similar to @businessdad's approach to deployment, I use the post-update (https://gist.github.com/kasperisager/d5bb51f79bc9052b11b7) hook to automatically update the working copy of a non-bare git repo when it's pushed to. This essentially allows any git repo to function as an endpoint for deployment. There's a great read on how it works here: https://git.wiki.kernel.org/index.php/GitFaq#non-bare

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

Sign In or Register to comment.