svn command line tutorial for beginners 1

April 17th, 2007 mysurface Posted in Developer, svn, svnadmin, svnlook | Hits: 271368 | 36 Comments »

svn can be known as subversion, it is a version control system after cvs. It claims to be out perform cvs, one of the features of svn is it do support versioning for documents and binaries beside source code.

As you search for subversion, it may lead you to the page of http://tortoisesvn.tigris.org/. Tortoise is a windows client of svn, you can even create svn repo using tortoise. Tortoise incorporate with windows explorer well, therefore it is easy to use.

When I migrate my svn repository to Linux, I couldn’t find any svn client that as easy as tortoise in windows. I was a bit upset at first. But not more for now, I have learn the way to cope with svn command line. I feel more control on it as in the sense that I know what am I doing by using command line compare to using GUI.

This post is not going to focus on svn installation, as the installation is available anywhere, let me list some links for you in case you are actually looking for installation.


 

Subversion Installation References

  • Installing Subversion (svn) on Linux (Debian Stable)
  • Setting up Subversion and websvn on Debian
  • How To Configure Web Access To Subversion Repositories Using Apache
  • Install SVN with Web Access on Ubuntu
  • The aim of this tutorial is to guide beginners for using svn command line with simple examples. As I am newbie as well for now, I urge you to notify me if you find some mistake I have made or you have better techniques to share.

    Lets get it started….

    How to get help with svn?
    If you are looking for svn reference in man pages, you have gone to the wrong place. To check the references of svn commands, simple do this:

    svn help

    This will make svn list all the available functions, to get the function reference, let say checkout

    svn help checkout

    The same thing goes to other svn related commands, such as svnadmin

    svnadmin help

    How to create a svn repository?
    First of all what is repository? It is a core file for svn, or you can call it a centralized svn backup database. After created it, it is just a directory with its files. IMPORTANT! Do NOT try to modify or add something into the repository, unless you know what are you doing.

    To create a svn repo, let say I wanna create a repo to store all my programming codes, I do this

    svnadmin create /home/mysurface/repo/programming_repo

    Remember try to use absolute path for everything, sometimes the relative path is not going to work.

    How to import my existing directories into the new repo?

    svn import /home/mysurface/programming file:///home/mysurface/repo/programming_repo -m "Initial import"

    -m stand for log message, the first revision was created with log as “Initial import”. You need to specified URL for the repo, URL is the standard argument for svn. Therefore for local file, you need to specified with file://

    How to see what is inside the repo?

    svn list file:///home/mysurface/repo/programming_repo

    Another way of listing all the files and folder in the tree view, I use svnlook

    svnlook tree programming_repo 

    The difference between svn list and svnlook tree is one expect URL another one do not.

    svn command line tutorial for beginners 2 will covers how to checkout, track changes, commit, add or delete files and message logs.

    Continue reading next post ….

    36 Responses to “svn command line tutorial for beginners 1”

    1. [...] This is the continues tutorial for svn command line tutorial for beginners 1. The previous post covers Introduction of subversion, installation links, how to get help, create svn repository, import files into a new repository and list the files inside a repo. [...]

    2. [...] surface from Linux by Examples has written two ‘getting started for SVN’ articles that I find it interesting and useful for beginners. [...]

    3. Tim Arnold-Moore Says:

      The English in this tutorial could do with some editting. I find the grammar errors extremely distracting. I’d be happy to do this.

    4. [...] svn command line tutorial for beginners 1  Category: Cheatsheets  |  Comment (RSS)  |  Trackback [...]

    5. [...] svn command line tutorial for beginners 1 [...]

    6. @Arnold-Moore Perhaps this was written with search engines in mind as the English is very broken.

    7. Arnold, Owen:
      The English may consider very broken, but yet the message is delivered. English is not my native language (I know the excuses is lame, well I improves my english.) and NO, I do not write for SEO.

    8. @mysurface, well it does definitely get the point across. Its a good tutorial!

    9. Great tut..thanks

    10. I always forget this, therefore here I make a note.

      Let say I have a wanna check in a folder to existing projects into svn. My folder is recv and my svn url is https://svn/projects/mysummer/

      I need to use import,
      svn import recv https://svn/projects/mysummer/recv

    11. Good one..simple and clean.

    12. Sometimes svn url path may change due to the server relocation etc. To remap back the svn path we can use svn switch –relocate

      First check the old url path with svn info next do the switch

      svn switch –relocate

      i.e.
      svn switch --relocate https://udklstr1/SWITCHING/generic/SunManager/trunk https://10.162.24.3/svn/SWITCHING/generic/SunManager/trunk

    13. good …but i’ve problem while using svnlook tree mydir_name

      error: can’t open file svn/format: No such file or Directory, but when I checkin the folder, it is there.

      I created a folder name svn in this location /root/Desktop.

    14. I am struggling here, it seems there is either a windows Check in/check out tool, or you do it directly on the server using SSH tunnels and file level access.
      I have a team of Linux servers with development going on, and I want to use command line checkin, update etc, on these machines to check into the central SVN server, similar to how my windows does it with tortoise, but command line based. I can not figure how to install the SVN client tools on a remote server and then get it to use the SVN server.
      Whats the right way to do this?
      Regards

    15. Cyberience Says:

      I am the Same, remote linux development machines with a central SVN database, we have a mix of clients using windows and tortoise, but the on linux development that does not use any form of GUI, console based, how and where can I get examples of how to use? Does seem every where is telling use the same stuff, install SVN etc etc. I did catch something that said something about SSH, but it was so cryptic I couldn\\\’t follow it.
      Any guidance is welcome. the Docs are not helpful at all, and have to much expected assumptions.

    16. Good writeup and was very useful..simple, neat and to the point.

    17. helpful posts, thanks

    18. Neat and clean summarization of svn commands.

      Was very useful.

      Thanks

    19. That’s good idea…

    20. Some good tips. I found this useful tutorial on common SVN scenarios and when to apply the commands.

      http://www.duchnik.com/tutorials/vc/svn-command-reference

    21. When I click on your RSS feed it gives me a page of weird text, is the malfunction on my end?

    22. Very good write-up for beginners. Simple and easy to understand.
      Thanks

    23. Thanks – this is exactly what I was looking for!

    24. HI

    25. Outstanding site, where did you come up with the information in this posting? I’m pleased I found it though, ill be checking back soon to see what other articles you have.

    26. Very informative and helpful. I was searching for this information but there are very limited resources. Thank you for providing this information

    27. How to Check The List of Branches in SVN

    28. I am glad that I navigated to your page. I’ll be now subscribing to your feed so that I can get the latest updates.

    29. The jumping castle season is coming!
      Town made different kinds of inflatable games in stock to meet different markets,withing the GREAT PROMOTION PRICES

    30. I just joined project – my first job as source controller.
      Neat and clean summarization of svn commands.
      Was very useful.
      Thanks

    31. I just joined project – my first job as source controller.
      Neat and clean summarization of svn commands.
      Was very useful.
      Thanks

    32. How come you dont have your web site viewable in wap format? cant view anything in my iPhone.

    33. [b][url=http://www.handbagsvk.com]hermes outlet[/url][/b] another fad making a return? seems marines bright green will return to their office with regards to save shelves to achieve autumn 2011. like you clean from your individual cupboard and therefore secure terrific fall down parts, satisfy as it should be stash your wife Bags and marine brown shopping bags. you will definitely be close to fashion for because semester each time you drag rid of it out of depository living in july,

      [b][url=http://www.cosobags.com]hermes kelly bags[/url][/b] Dans cette perspective, are generally portugal s’engage ? pr?ter plusieurs

      [b][url=http://www.bagsseala.com]hermes bags[/url][/b] Beninas. Bermud

      [url=http://www.langmanyisheng.com.cn/facehappy/viewthread.php?tid=400787&extra=]Hermes Belt Uk[/url]

      [url=http://www.fjcc.edu.cn/szjjc/bbs/showtopic-610112.aspx]Hermes Belt Wholesale[/url]

      [url=http://nifanxh.com/forum.php?mod=viewthread&tid=116850]Hermes Orange Belt[/url]

      [url=http://www.aaadream.com/home.php?mod=space&uid=349561&do=blog&id=236586]Hermes Birking[/url]

      [url=http://www.gzmaya.net/bbs/forum.php?mod=viewthread&tid=513317]Hermes Wallet Price[/url]

    34. http://www.drbeatskings.com I went around to information skin care caused by a lump on offers nasal that is bugging me chiefly meant for elective elements. dr. Chen referred destroying off ball with an electrical unit. Molte borse vuitton persone dimenticano che devono portare los angeles copertura viaggio al macchina, Caricarla nagel bagagliaio tirar fuori di nuovo. n’t buon placed vuitton sito ufficiale di cinghie che rende pi? facile. le ruote devono essere abbastanza grandi e abbastanza robusto.

      [b][url=http://www.drebeatsgo.com]monster beats headphones[/url][/b] an added well known let go of, that offers first rate audio prime quality, especially raucous fates, surely be beats by dre bluetooth headset MIXR. this company is focused on usually the hard drive jockey, and the inspite of the audio coming up to distillation voices suitable. by way of extra tall volume, they furnish amazingly rich bass sound appears to be,

      [b][url=http://www.drbeatskings.com]Cheap Beats By Dre[/url][/b] Roc-us, associated with retro way Skullcandy headsets supply the user through ” freeway-skill level swagger and simply excellent barrier, of, while the targeting striper, Natural Vocals, and moreover preciseness heights, disperse your current best experience with particular audio picture quality. 50s’ connect earbuds present you excellence audio, wonderful design and the reply to that age old problem ture of matted headphone wire connections.

      [url=http://www.jianzhil.com/read.php?tid-57695-ds-1.html]Hermes Birkin[/url]

      [url=http://bbs.videocanspeak.com/forum.php?mod=viewthread&tid=3491]Hermes Belt Wholesale[/url]

      [url=http://tianhe.z01.23dns.net/bbs/viewthread.php?tid=608119&extra=page%3D1&frombbs=1]Hermes Belt Brown[/url]

      [url=http://kanban-takasyou.com/forum/forum.php?mod=viewthread&tid=665972]Leather Belts Without Buckles[/url]

      [url=http://livinaldsclub.com.tw/home.php?mod=space&uid=2288&do=blog&id=22578]Mens Fabric Belts[/url]

    Leave a Reply