Skip to content

Instantly share code, notes, and snippets.

@Shadowfiend
Forked from nomothetis/gist:1040861
Created June 22, 2011 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shadowfiend/1040867 to your computer and use it in GitHub Desktop.
Save Shadowfiend/1040867 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 from the master branch."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment