Originally published on 2014-08-20; fully revised and updated.
If you are preparing for a DevOps, build/release, or legacy enterprise tooling interview, SVN (Subversion) still comes up regularly. This guide turns the original question list into practical answers you can use in interviews and in real repositories.

SVN fundamentals you should explain clearly
SVN (Subversion) is a centralized version control system. A central repository stores project history, and developers work from local working copies. Each commit creates a new revision in the repository.
- Repository: Central store of versioned files and history.
- Working copy: Your local checked-out files.
- Revision: A repository-wide snapshot ID created by commit.
- Update: Pull repository changes into your working copy.
- Commit: Push local committed changes to repository.
Trunk, branch, and tag in SVN
A common SVN layout is trunk/, branches/, and tags/. These are directory conventions in the repository, not separate repository types.
| Path | Typical purpose | Change pattern | Interview-ready explanation |
|---|---|---|---|
| trunk/ | Main development line | Frequent commits | Default integration branch for active work |
| branches/feature-x | Isolated feature or release work | Temporary or long-lived | Created to avoid destabilizing trunk |
| tags/v1.0.0 | Release snapshot marker | Usually no further edits | Immutable by convention, used for reproducible releases |
# Create a branch from trunk
svn copy https://svn.example.com/repos/app/trunk \
https://svn.example.com/repos/app/branches/release-1.0 \
-m "Create release branch"
# Create a tag from trunk
svn copy https://svn.example.com/repos/app/trunk \
https://svn.example.com/repos/app/tags/v1.0.0 \
-m "Tag v1.0.0"Code language: PHP (php)
Update vs commit vs “synchronize with repository”
Update and commit are core SVN operations. “Synchronize with repository” is often a GUI/client phrase that combines checking incoming and outgoing changes, then reconciling them.
| Operation | Direction | What it does | Common command |
|---|---|---|---|
| Update | Repository → working copy | Brings local files up to latest revision | svn update |
| Commit | Working copy → repository | Publishes your local changes as a new revision | svn commit -m “message” |
| Synchronize | Both (workflow concept) | Review incoming and outgoing changes, resolve conflicts, then update/commit | Client-dependent wording |
flowchart TD
A[Edit working copy] --> B[Run svn status and svn diff]
B --> C[Run svn update]
C --> D{Conflicts found}
D -- Yes --> E[Resolve conflicts]
D -- No --> F[Run tests]
E --> F[Run tests]
F --> G[Run svn commit]
G --> H[New repository revision]
# Typical daily cycle
svn status
svn diff
svn update
# resolve conflicts if any
svn commit -m "Describe what changed and why"Code language: PHP (php)
How to create and apply a patch in SVN
Patch workflows are useful when you need to share changes without direct commit access.
# Create a patch from your working copy changes
svn diff > fix.patch
# Apply patch with SVN client support
svn patch fix.patch
# Alternative with system patch tool
patch -p0 < fix.patchCode language: PHP (php)
Handling conflicts and overriding local files with repository versions
If update produces conflicts and you want to discard local edits, first revert local changes, then update. Use this carefully because local modifications are lost.
# See changed and conflicted files
svn status
# Discard local edits recursively
svn revert -R .
# Pull clean repository state
svn updateCode language: PHP (php)
For already-marked conflicts, you may resolve by accepting repository content where appropriate:
svn resolve --accept theirs-full -R .
svn update
Backup and restore process in SVN
Interviewers often expect two backup patterns: hotcopy for fast full copies and dump/load for portable backups and migrations.
# Full repository backup
svnadmin hotcopy /var/svn/project /backup/project-hotcopy
# Logical backup
svnadmin dump /var/svn/project > /backup/project.dump
# Restore to a new repository path
svnadmin create /var/svn/project-restored
svnadmin load /var/svn/project-restored < /backup/project.dumpCode language: PHP (php)
Important: these commands run on server-side repository paths, not on a local working copy checkout.
How to set up SVN and authentication (quick reference)
SVN is commonly served either through svnserve or Apache HTTP server with WebDAV SVN modules. The right choice depends on your access, security, and integration requirements.
| Serving option | Strength | Typical auth approach | When teams choose it |
|---|---|---|---|
| svnserve | Simple, lightweight | Built-in passwd/authz files | Internal networks, straightforward setups |
| Apache + SVN modules | HTTP(S), mature integration | HTTP auth methods plus authz rules | Enterprise environments, centralized web auth |
Minimal svnserve setup example
# Create repository
svnadmin create /srv/svn/myrepo
# Start svnserve daemon rooted at /srv/svn
svnserve -d -r /srv/svnCode language: PHP (php)
# /srv/svn/myrepo/conf/svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
authz-db = authzCode language: PHP (php)
# /srv/svn/myrepo/conf/passwd
[users]
alice = strong-password
bob = another-passwordCode language: PHP (php)
# /srv/svn/myrepo/conf/authz
[/]
alice = rw
bob = rCode language: PHP (php)
10 SVN interview questions to practice
- What is SVN, and how is centralized version control different from distributed models?
- What are trunk, branches, and tags, and how are they used in release workflows?
- What does “synchronizing with repository” mean in your client/tooling context?
- What is the difference between
svn updateandsvn commit? - How do you generate and apply patches in SVN?
- How do you handle merge conflicts during update?
- How would you force local files to match repository state?
- How do you design a practical trunk/branch/tag strategy?
- How do you back up and restore an SVN repository?
- How do you configure authentication and authorization for SVN access?
Common pitfalls and best practices
- Always run
svn updatebefore commit to reduce avoidable conflicts. - Treat tags as read-only by team policy.
- Use clear, audit-friendly commit messages.
- Back up repositories on a schedule and test restore procedures.
- Use least-privilege authz rules (read-only where possible).
- Do not run destructive commands like
svn revert -R .unless you are sure local changes are disposable.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals