Created
June 22, 2011 19:10
-
-
Save nomothetis/1040861 to your computer and use it in GitHub Desktop.
Fish script for committing to SVN via git-svn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script requires fish-nuggets, available at: | |
# http://github.com/nirvdrum/fish-nuggets | |
function svnc --description "Commit from git master to SVN." | |
if not is-git | |
echo "svnc can only be run from a git repository." | |
return | |
end | |
set -l branch (env git symbolic-ref -q HEAD) | |
echo $branch | |
if [ $branch = "refs/heads/master" ] | |
git svn rebase | |
git svn dcommit | |
else | |
echo "Changes can only be pushed to the SVN repository form the master branch." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment