Questions tagged [svn]

Use this tag for questions about SVN (Subversion), a centralized open-source revision control system distributed under the Apache License.

Apache Subversion

Apache Subversion (SVN) is a centralized version control system, available as free software under the .

When Subversion was first conceived in 2000, the design goal was to fix CVS. Since 2009, Subversion has been an Apache project.
See its own SVN repo in svn.apache.org or its mirror on GitHub.

Subversion can be used from the command line, but also has clients for , and . A popular client, which integrates into Windows-Explorer, is TortoiseSVN. A list of SVN clients with comparison can be found here.

References

The Subversion book is an excellent reference source, cite it in your SVN answers! Please use links to the latest stable release of the book (not to the nightly builds to avoid broken links).

Frequently-asked questions

If you are new to Apache Subversion or in general please take some time to read the SVNBook. The must-read articles are:

26703 questions
215
votes
8 answers

How to discard local changes in an SVN checkout?

I wanted to submit a diff for review, for an Open Source Project. I got the code using SVN (from terminal, Ubuntu). And I did minor edits in few files. Now there is only a single change I want to submit. Rest of the changes I made, were for…
Vinayak Garg
  • 6,518
  • 10
  • 53
  • 80
214
votes
9 answers

How do you see recent SVN log entries?

Typing svn log spits out an incredibly long, useless list on a command line. I have no idea why that is the default. If I wanted to read (or even could read) 300 entries on the terminal, I wouldn't mind typing svn log --full or something similar.…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
214
votes
5 answers

"unadd" a file to svn before commit

I was in the middle of doing a recursive svn add/commit, and a folder which did not have the proper ignore properties was included. I've got about 100 uploaded binary files versioned now, but I haven't committed yet. What is the easiest way to…
Lowgain
  • 3,254
  • 5
  • 27
  • 30
210
votes
10 answers

How can I remove all my changes in my SVN working directory?

I have an SVN working directory. I made some changes in that directory, and it shows in svn status. But is there any way for me to remove all my changes in there and just get everything from the trunk using the command line?
n179911
  • 19,547
  • 46
  • 120
  • 162
201
votes
13 answers

Reverting single file in SVN to a particular revision

I have a file as shown below in an SVN repo that I would like to revert to a previous version. What is the way to do this in SVN? I want only downgrade this particular file to an older version, not the whole repo. Thanks. $ svn log…
Gökhan Sever
  • 8,004
  • 13
  • 36
  • 38
196
votes
9 answers

How to attribute a single commit to multiple developers?

The way all version control systems I'm familiar with work is that each commit is attributed to a single developer. The rise of Agile Engineering, and specifically pair programming, has lead to a situation where two developers have made a…
user360907
196
votes
19 answers

SVN repository backup strategies

What methods are available for backing up repositories in a Windows environment?
Robert Dean
  • 3,193
  • 3
  • 25
  • 29
195
votes
3 answers

SVN:externals equivalent in Git?

I have two SVN projects in use from another SVN repository using svn:externals. How can I have the same repository layout structure in Git?
dsimard
  • 7,380
  • 4
  • 21
  • 25
194
votes
11 answers

How to escape @ characters in Subversion managed file names?

For many Subversion operations, appending the '@' symbol to the end of a file or URL argument allows you to target a specific revision of that file. For example, "svn info test.txt@1234" will give information about test.txt as it existed in…
weston
  • 2,878
  • 3
  • 24
  • 23
193
votes
11 answers

Exclude .svn directories from grep

When I grep my Subversion working copy directory, the results include a lot of files from the .svn directories. Is it possible to recursively grep a directory, but exclude all results from .svn directories?
Kees Kist
  • 2,641
  • 5
  • 20
  • 25
187
votes
9 answers

How can I view all historical changes to a file in SVN

I know that I can svn diff -r a:b repo to view the changes between the two specified revisions. What I'd like is a diff for every revision that changed the file. Is such a command available?
Gordon Wilson
  • 26,244
  • 11
  • 57
  • 60
186
votes
21 answers

How to fix "containing working copy admin area is missing" in SVN?

I deleted manually a directory I just added, offline, in my repository. I can't restore the directory. Any attempt to do an update or a commit will fail with: "blabla/.svn" containing working copy admin area is missing. I understand why, but is…
Bite code
  • 578,959
  • 113
  • 301
  • 329
183
votes
19 answers

How do I 'svn add' all unversioned files to SVN?

I'm looking for a good way to automatically 'svn add' all unversioned files in a working copy to my SVN repository. I have a live server that can create a few files that should be under source control. I would like to have a short script that I…
JerSchneid
  • 5,817
  • 4
  • 34
  • 37
182
votes
14 answers

How do you manage databases in development, test, and production?

I've had a hard time trying to find good examples of how to manage database schemas and data between development, test, and production servers. Here's our setup. Each developer has a virtual machine running our app and the MySQL database. It is…
Matt Miller
  • 3,501
  • 5
  • 27
  • 26
181
votes
11 answers

What is a pre-revprop-change hook in SVN, and how do I create it?

I wanted to edit a log comment in the repository browser and received an error message that no pre-revprop-change hook exists for the repository. Besides having a scary name, what is a pre-revprop-change hook, and how do I create it?
Manu
  • 28,753
  • 28
  • 75
  • 83