Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do I check out TRUNK vs the FULL PROJECT in an SVN repo?

Got a (hopefully small) question regarding SVN and checking out repos. Basically I see conflicting tutorials and suggestions regarding what to check out and when. Some will say:

svn co http://my.repos.com/project my_project

…while others say:

svn co http://my.repos.com/project/trunk my_project

When would I want to grab the trunk directly vs the entire project? In the past I've never had trouble with either, but I'm not sure if there are scenarios where one is preferable to the other.

Best.

like image 590
humble_coder Avatar asked Jun 29 '10 22:06

humble_coder


People also ask

What is checkout and checkin in svn?

ADVERTISEMENT. ADVERTISEMENT. The Checkout command is used to copy the files from the SVN repository to the working copy. If we want to access files from the SVN server, then we have to check out it first. The checkout operation creates a working copy of the repository where we can edit, delete, or add contents.

What is checkout in Subversion?

By checking out files from a Subversion repository, you obtain a local working copy of the repository, which you can edit. After making the necessary changes, you can publish the results by committing, or checking in your changes to the repository.

How do I checkout revision in svn?

If you want to write a script which requires no input, you should use the official Subversion command line client instead. checkout a working copy in REV revision: svn checkout --revision REV https://svn.example.com/svn/MyRepo/trunk/ svn checkout https://svn.example.com/svn/MyRepo/trunk/@REV.


1 Answers

usually a subversion repository has 3 main directories :

  1. branches
  2. tags
  3. trunk

Trunk is for the most up to date branch of the code.

Branches are usually created in order to develop a specific feature that you do not yet want in the trunk.

Tags are like save-points of the trunk.

If you do a checkout at the root of the project, you will get all the branches, all the tags and the trunk. This can lead to a huge amount of data.

For example, if each code release is tagged, you will get the source code from all your past releases !

I hope this will help you

Jerome Wagner

like image 184
Jerome WAGNER Avatar answered Oct 11 '22 05:10

Jerome WAGNER