Skip to content

Instantly share code, notes, and snippets.

@esimionato
Created November 4, 2011 00:23
Show Gist options
  • Save esimionato/1338340 to your computer and use it in GitHub Desktop.
Save esimionato/1338340 to your computer and use it in GitHub Desktop.
SVN: Branching y Merging
SVN: branching y merging en 8 comandos
Trabajar con ramas en SVN es un dolor de muelas (sobre todo si estás acostumbrado a GIT), pero eso no es razón para no utilizarlas. Sólo hace falta conocer 8 sencillos comandos.
1. Branching
$ svn copy http://my.svn.com/myrepo/trunk \
http://my.svn.com/myrepo/branches/featurex \
-m "Created featurex branch from trunk"
$ svn switch http://my.svn.com/myrepo/featurex
2. Algunos commits después: Merging
$ svn switch http://my.svn.com/myrepo/trunk
$ svn up
Tomemos la revisión que nos indica el comando y llamémosla YY.
$ svn log --stop-on-copy http://my.svn.com/branches/featurex
Cojamos ahora, la revisión del último mensaje de log y llamémosla XX.
$ svn merge -rXX:YY http://my.svn.com/branches/featurex
$ svn ci -m "Merge branch featurex into trunk [XX:YY]"
3. Un poco de limpieza (opcional)
$ svn delete http://my.svn.com/branches/featurex \
-m "Removed featurex branch"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment