Making WordPress.org

Changeset 6961


Ignore:
Timestamp:
03/28/2018 08:35:43 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Git Hooks: Add example of script to handle multiple sites.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/.githooks/README.md

    r6860 r6961  
    1414## git svn dcommit
    1515
    16 git-svn doesn't support hooks natively, but we can use an alias instead.
     16git-svn doesn't support hooks natively, but there are a few ways around that.
    1717
    18 1. Add the following to your `.gitconfig`:
     181. The simplest way is to add an alias to your `.gitconfig`:
    1919
    2020        ```
    2121        [alias]
    22                 svnpush = !sh .git/hooks/pre-svn-dcommit && git svn dcommit --interactive
     22                svnpush = !sh .git/hooks/pre-svn-dcommit && git stash && git svn dcommit --interactive && git stash pop
    2323        ```
    2424
     251. That isn't very flexible, though, since it'd run for every site. To run it only for WordCamp.org, you can create [a `git-svnpush` script](https://github.com/iandunn/dotfiles/blob/ebdb5d3d7b6d335680cf9e44544cbcbea49cf85e/bin/git-svnpush) in your `$PATH`, with executable permissions.
     26
    25271. When you're ready to push, call `git svnpush` instead of `git svn dcommit`.
Note: See TracChangeset for help on using the changeset viewer.