Skip to content

Instantly share code, notes, and snippets.

@willgm
Created October 28, 2015 13:05
Show Gist options
  • Save willgm/a5999bc5a66a2258173f to your computer and use it in GitHub Desktop.
Save willgm/a5999bc5a66a2258173f to your computer and use it in GitHub Desktop.
svn git integration
function runCmd {
echo "\e[42m\e[30m>> $1 \e[49m\e[39m" ; bash -c $1
}
function svnup {
runCmd 'git pull' &&
runCmd 'svn up --accept tc' ;
runCmd 'svn revert -R .' ;
runCmd 'git status' ;
runCmd 'svn status'
}
function svnpush {
(
runCmd 'git add -A' &&
runCmd 'git commit -m "svn up"' &&
runCmd 'git push'
) ;
runCmd 'git status' ;
runCmd 'svn status'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment