Created
June 8, 2015 19:18
-
-
Save BuZZ-dEE/72bb1a76ec502c286215 to your computer and use it in GitHub Desktop.
Git SVN (Subversion) commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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