Skip to content

Instantly share code, notes, and snippets.

@shadyvb
Last active August 29, 2015 14:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadyvb/df5116bf8634f017ca06 to your computer and use it in GitHub Desktop.
Save shadyvb/df5116bf8634f017ca06 to your computer and use it in GitHub Desktop.
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
grunt
# 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