I’m comparing SVN and Git.
I know ‘svn checkout’ is the same as ‘git clone’ in that both include the history of the original repository.
In Git, once ‘git clone’ is done, I don’t need to ‘git clone’ any more to get the history of the original repository, because I can ‘git fetch’ and ‘git merge’ which are lighter and quicker than ‘git clone’. So ‘git fetch’ and ‘git merge’ can keep my repository as the perfect backup of the original repository.
But what about SVN?
‘svn checkout’ is very expensive work, because it deals with the whole repository.
So to do ‘svn checkout’ whenever I want is not a good choice.
‘svn update’ is far lighter than ‘svn checkout’ because ‘svn update’ delivers only updated stuff.
I wonder if ‘svn update’ includes the history of the original repository.
If it does, ‘svn update’ can keep my checkedout repository as the backup of the original one.
If it does not, there is no easy way to keep my checkedout repository as the backup of the original one.
Please give me the good answer ^^
SVN keeps only the working copy locally. This means that a
svn checkoutonly creates a working copy of the current HEAD (and asvn updateupdates an existing working copy to the current HEAD), but the commit history is still kept on the server (if you do for example asvn log, the commit history is loaded from server).Git on the other side keeps the entire repository — not only the working copy (“working tree” in git-speak), but also the entire commit history.
If you want to revert your SVN working copy to an older version, you can do that using
svn update -r[revision number], but then again SVN will pull the specified revision from server.