Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fish script for committing to SVN via git-svn
# 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