Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion - What are the differences between the SVN checkout and SVN update commands?

I understand that the "SVN checkout" command will do the initial get of file(s) from the Subversion repository and bring them locally to your working directory/copy and that the "SVN update" command will get changes to file(s) from the repository if changes have been made by others.

It seems to me though that an "update" is just a special case of a "checkout", that is, when a checkout occurs, it's getting all files since none yet exist locally and hence ALL of the files have "changed", and that behind the scenes these commands are doing largely the same thing. I assume the commands exist separately just as a means of simplification?

Or, are there other differences between the commands, for example, does "SVN update" get files get new files (files that exist in the repository that you don't have in your working copy) or just updates to existing files?

like image 589
Emilio Avatar asked Feb 12 '10 19:02

Emilio


People also ask

What is svn update command?

The SVN update Command. The svn update command lets you refresh your locally checked out repository with any changes in the repository HEAD on the server. It also tells you what has been changed, added, deleted. If a change has been made to a file you have also changed locally, svn will try to merge those changes.

What is the difference between svn checkout and export?

svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with . svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit .

What is svn Update and svn commit?

Commit = Commit/confirm your changes to the repository. Update = Get the latest version/changes from the repository. When you change a file and want to keep the changes, commit them to the repository. When you want to get the latest available version/s from the repository, use update to update your local files.

What is an svn checkout?

Advertisements. Subversion provides the checkout command to check out a working copy from a repository. Below command will create a new directory in the current working directory with the name project_repo.


1 Answers

As I see it, the big difference is that checkout creates a working copy, whereas update brings down changes to an existing working copy.

like image 173
karoberts Avatar answered Sep 25 '22 00:09

karoberts