Skip to content

Instantly share code, notes, and snippets.

@BuZZ-dEE
Created June 8, 2015 19:18
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 BuZZ-dEE/72bb1a76ec502c286215 to your computer and use it in GitHub Desktop.
Save BuZZ-dEE/72bb1a76ec502c286215 to your computer and use it in GitHub Desktop.
Git SVN (Subversion) commit
#!/bin/bash
msgFlag="$1"
msg="$2"
shift 2
if [ "$msgFlag" == "-m" ]; then
if [[ -f "$msg" || -d "$msg" ]]; then
echo "The second argument needs to be the commit message."
else
git add "$@"
git commit "$msgFlag" "$msg" "$@"
git svn rebase
git svn dcommit
fi
else
echo "The first argument needs to be the commit message flag -m."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment