Skip to content

Instantly share code, notes, and snippets.

@fengli320
Forked from hendrauzia/svn_workflow.sh
Created June 11, 2020 13:54
Show Gist options
  • Save fengli320/e2f9e882266c7078299e141a8113ad4b to your computer and use it in GitHub Desktop.
Save fengli320/e2f9e882266c7078299e141a8113ad4b to your computer and use it in GitHub Desktop.
SVN Workflow
# create working directory from trunk
svn checkout http://somedomain.com/repo/trunk
# create a branch
svn copy http://somedomain.com/repo/trunk \
http://somedomain.com/repo//branches/feature-do-awesome-thing \
-m "Created branch to implement feature do awesome thing."
# switch working copy
svn switch ^/repo/branches/feature-do-awesome-thing
# in beanstalk you have to type the whole address, in that case:
svn switch https://[email protected]/repo/branches/feature-do-awesome-thing
# delete a branch
svn rm https://[email protected]/repo/branches/feature-do-awesome-thing \
-m "Removed branch feature-do-awesome-thing for xxx purpose."
# restore deleted branch
svn copy http://somedomain.com/repo/branches/feature-do-awesome-thing@123 \
http://somedomain.com/repo//branches/feature-do-awesome-thing \
-m "Restore deleted branch feature-do-awesome-thing."
# merge a branch
svn merge https://[email protected]/repo/trunk
# resolve conflict
svn resolve --resolve (working|theirs-full|mine-full) path/to/file
# resolve tree conflict
# e.g.: local add, incoming add upon merge
svn resolve --resolve working -R .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment