Monday 6 February 2012

Useful SVN commands

Usefull SVN commands

Have been increasingly using command line SVN these days. Find it's just a bit quicker and more reliable than the GUI clients I had been using. I've mainly written this for myself, as a quick reference for the commands I use most frequently

svn help COMMAND
  • Displays help for a particular svn command.
  • Lists all available commands if none is specified

svn co URL[@REV]
  • Check out: Creates a local working copy of the repository found at the URL

svn log
  • Provides a log of commit messages
  • Use with -l 10 to limit to 10 most recent messages
  • Use -v for verbose output (lists changed files)
  • Use -r 12345 to get info on particular revision

svn info
  • Provides useful information about the current working copy, such as repository URL, and current revision

svn status
  • Provides a list of diffences between the working copy, and the repostory. Take a look at the help (svn help status to find out what the different column values mean)

svn diff
  • Displays local modifications
  • Use -r N:M to display differences between two revisions
  • Use -c to see the changes for a particular revision

svn revert PATH
  • Reverts the specified path to the contents of the repository. You will lost any local changes!
  • Not recursive by default, use -R to make recursive

svn add PATH
  • Adds the specified path the version control.
  • Note, this doesn't add the file to the repository yet, that doesn't happen till you commit.

svn copy SRC[@REV] DEST
  • Copies something from SRC to DEST.
  • SRC and DEST can both be either working copies paths, or URLS.
  • Usual usage would be WC -> WC, or URL -> URL.
  • URL -> URL is used for branching and tagging

svn delete TARGET
  • Deletes a file.
  • If TARGET is a working copy path, the file is scheduled for deletion on the next commit
  • If TARGET is a repository URL, it immediately deletes the file from the repository.

svn move SRC DST
  • Moves a the specified target.
  • Equivalent of a copy then a delete
  • Maintains history on the moved file.

svn commit -m MESSAGE
  • Commits the working copy changes to the repository

svn list TARGET
  • Provied a directory listing for the specified folder in the repository

svn mkdir TARGET
  • Creates a directory
  • TARGET can be working copy path or repository URL

svn merge -r N:M SOURCE@REV
  • Merges the range of revisions starting at N and ending at M from SOURCE into the current working copy
  • If N > M then it is a reverse merge, and can be used to undo the differences between N and M
  • Typically used to catch up a feature branch
  • Can use -c option to pick a single revision
  • Can supply multiple -c and -r options to cherry pick revisions

svn merge --reintegrate SOURCE@REV
  • Used to reintegrate a branch into it's parent branch
  • Working copy should be the parent branch (often trunk)
  • A branch cannot be reintegrated twice, so good practice to delete the branch afterwads
svn blame TARGET@REV
  • Outputs target, with author names, and revision numbers attached to changes
  • Use to see who broke what.

23 comments:

Unknown said...

I am so much excited after reading your blog. http://www.iessaywriting.net/Your blog is very much innovative and much helpful for any industry as well as for person.:-)

sofwarewiki said...

Oh, did I just missed the "svn update" command. I use that very often to get my local sync with latest on remote repo.

Unknown said...

As nice blog,but you could have site made this blog more cool if you could configure the language changer pluigin but all the same you have done a good job&^^

Unknown said...

Great way of bring this topic to discussion.
Thesis writing service

aliyaa said...

The app demo video production is a best site for apps promotions. It just provide you best services.

aliyaa said...

This different creative domestic sites are really admirable for the essay lovers.

paulsmith198914@gmail.com said...

I just wanted to say that we don't know each other, but I'm a huge fan of your work. I find your work useful and cognitive. Visit online proofreading jobs with proof-reading.services in order to make your writings more clear.

Unknown said...


nice! thank you so much! Thank you for sharing. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me.
192.168.l.l

susan said...

Students want to be given exciting tasks in their homework so they can complete it while also enjoying the task. Students are in the age in which they don’t want to be given any kind of task which can bore them and homework being one of them. Students are given the topics which they have to complete in their assignments, the topics are highly tiring and also very long to finish. Students climb a ladder full of steps in order to finish their homework. The steps being; researching, thinking, writing and also editing. Students must have these skills so to finish their assignments. They must be proficient in these skills so to score high marks when it comes to assignments. However, students face problems in doing so and from there we come in with a dynamic entry! We provide students our experts who have the efficient skills which students need to finish their assignment. Our services are not limited to only such, our time managing and quality abilities are also given to you. You can the assistance with just a little money. Our homework help online services are given to students who struggle doing their assignment properly.
HomeWork Help Online Australia
live assignment help

andrea said...

This is a great motivating content.I am fairly much happy with your great work.You put really very information.
iwaylinks
plurk
3-peace
vtv10
limesparrow

The Custom Boxes Print said...

I love reading through your blog; I wanted to leave a little comment to support you and wish you a good continuation.
I wish you the best of luck for all your blogging efforts.
Custom Packaging Boxes USA

The Custom Boxes Print said...

I love reading through your blog; I wanted to leave a little comment to support you and wish you a good continuation.
I wish you the best of luck for all your blogging efforts.
Custom Packaging Boxes USA

meldaresearchusa said...

To ease services,we avail web portal for Already Written Essay where Australian students make “write my essay” “write my research paper” and “write my paper” requests.

Sahib Khan said...

black friday sales at walmart
nvidia gtx 1070 deals black friday
black friday asus zen aio 23.8" touch-screen intel core i7
geforce gtx 1080 ti gpu black friday 2020
motherboard x299 lga2066 black friday

black friday sales at walmart
nvidia gtx 1070 deals black friday
black friday asus zen aio 23.8" touch-screen intel core i7
geforce gtx 1080 ti gpu black friday 2020
motherboard x299 lga2066 black friday

Jessica Jones said...

An impressive share here post and, I recently with all this onto a colleague who had previously been doing little analysis about this topic article and, I can come here again to read you, as you have done a wonderful job. assignments help australia -
assignment help in melbourne -
Assignment Help Adelaide

Emma Jackson said...

Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles. Many people are depressed grammar check about the problems of math-homework help. Well, don’t worry about that because we are providing this service nursing assignment help at a very reasonable price.

Karthikbk said...

This is the best software training institute to learn MSBI Courses in Chennai at an affordable price to make your career development the best.

Karthikbk said...

Software training institute in Chennai

james said...

Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles.

Now it's time to avail
Printed Polo shirts for more details.

Henry said...

I was facing problems for a while but after following your steps. I have solved this one. Now it's time to avail derma rollers for more information.

madmax said...

Thanks for sharing your thoughts about meta_keyword. Regards 먹튀검증

https://muk-119.com

Ava James said...

It is very useful article for the programmers. You explain every point and every thing in a very simple and easiest manner. Thankyou for sharing quality of content with us. Now its time to avail Limo service West Palm Beach for more information.

Michael White said...

I learned something from your blog.
Take My Online Course For Me