Skip to content

Instantly share code, notes, and snippets.

@kriscooke
Created April 23, 2020 18:21
Show Gist options
  • Save kriscooke/b4f3e9a2ce52fa406c48d0e5bee1cbe8 to your computer and use it in GitHub Desktop.
Save kriscooke/b4f3e9a2ce52fa406c48d0e5bee1cbe8 to your computer and use it in GitHub Desktop.

Revisions

  1. kriscooke created this gist Apr 23, 2020.
    9 changes: 9 additions & 0 deletions post-checkout
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # https://ttboj.wordpress.com/2014/05/06/keeping-git-submodules-in-sync-with-your-branches/

    # Create a file in your project's hooks: touch .git/hooks/post-checkout
    # And add the following:

    #!/bin/bash
    exec git submodule update

    # Then chmod u+x .git/hooks/post-checkout