Created
June 8, 2011 16:08
-
-
Save jpdelatorre/1014726 to your computer and use it in GitHub Desktop.
Basic SVN commands
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
#initial import to repository | |
$ cd project_dir | |
$ mkdir branches tags trunk | |
$ svn import . http://repository/ | |
#checkout a working copy | |
$ cd project_dir | |
$ svn co http://repository/trunk . --username your_username | |
#creating a new branch | |
$ svn copy http://repository/trunk http://repository/branches/new_branch_name | |
#merging trunk changes to a branch | |
$ cd branch_working_copy | |
$ svn merge http://repository/trunk | |
$ svn commit -m "merged latest trunk changes to my branch" | |
#merging branch back to trunk | |
$ cd trunk_working_copy | |
$ svn up | |
$ svn merge --reintegrate http://repository/branches/branch_name | |
....do some test and make sure everything is working.... | |
$ svn commit -m "merge branch_name back into trunk" | |
$ svn delete http://repository/branches/branch_name -m "remove branch_name" | |
#rollback to previous revision | |
$ cd trunk_working_copy | |
$ svn up | |
$ svn merge --dry-run -r:15:11 http://repository/trunk | |
... check if changes are fine ... | |
$ svn merge -r:15:11 http://repository/trunk | |
$ svn commit -m "reverted to revision 11" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment