Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:10
What would you like to do?
Git+SVN steps/script
# Update from SVN repo
svn up
# Commit the updates into Git repo, using the last revision id of SVN
git add .; git commit -m r`svn info $url | grep 'Last Changed Rev' | awk '{ print $4; }'` -n
# Merge the feature branch, after CR
git merge origin/FEATURE-BRANCH
# Run grunt or any pre-svn-commit steps
# See what is getting committed, just to make sure
svn st
# Add any newly added files that are not yet tracked by SVN
svn add file1 file2
# OR if Git and SVN are in total sync, and no untracked files exists that should not be committed to SVN:
svn st | awk '/\?/ {print $2}' | xargs svn add
# Commit to SVN
svn ci -m '[Ticket-ID] Ticket description'
# OR, if jira-cli is installed and configured correctly:
svn ci -m "`jira-cli view TICKET-ID --format '%key - %summary'`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment