Skip to content

Instantly share code, notes, and snippets.

@nomothetis
Created June 22, 2011 19:10
Show Gist options
  • Save nomothetis/1040861 to your computer and use it in GitHub Desktop.
Save nomothetis/1040861 to your computer and use it in GitHub Desktop.
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