I work on a remote SVN repository using git-svn and I use git-flow workflow for my local development.
Unfortunately accidentally a couple of times I did the svn dcommit while being on a feature branch, while I want to only dcommit master.
What I'd like to do is to create a pre-svn-dcommit hook that would check whether I'm on the master branch or not. Unfortunately git doesn't seem to ship with such hook.
I did find two potential approaches/solution:
- https://github.com/padwan-ragavan/preSVNDcommitHook - I'm not too comfortable with replacing the git-svn binary though.
- http://davidsouther.com/2012/04/git-svn-dcommit-hooks/ - this on the other hand looks a bit too complicated for my liking (and needs).
Any advices how this can be achieved?