{"id":372,"date":"2026-10-13T23:11:06","date_gmt":"2026-10-13T23:11:06","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2014\/08\/20\/interview-questions-and-answers-in-svn-subversion\/"},"modified":"2026-10-13T23:11:06","modified_gmt":"2026-10-13T23:11:06","slug":"interview-questions-and-answers-in-svn-subversion","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/interview-questions-and-answers-in-svn-subversion\/","title":{"rendered":"SVN Interview Questions and Answers: Trunk, Branch, Tag, Update, Commit, Patch, Backup, and Authentication"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Originally published on 2014-08-20; fully revised and updated.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2014\/08\/svn-subversion-interview-qu.png\" alt=\"svn-subversion-interview-questions-and-answers\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">SVN fundamentals you should explain clearly<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>SVN (Subversion)<\/strong> 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.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Repository:<\/strong> Central store of versioned files and history.<\/li><li><strong>Working copy:<\/strong> Your local checked-out files.<\/li><li><strong>Revision:<\/strong> A repository-wide snapshot ID created by commit.<\/li><li><strong>Update:<\/strong> Pull repository changes into your working copy.<\/li><li><strong>Commit:<\/strong> Push local committed changes to repository.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Trunk, branch, and tag in SVN<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A common SVN layout is <code>trunk\/<\/code>, <code>branches\/<\/code>, and <code>tags\/<\/code>. These are directory conventions in the repository, not separate repository types.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Path<\/th><th>Typical purpose<\/th><th>Change pattern<\/th><th>Interview-ready explanation<\/th><\/tr><\/thead><tbody><tr><td>trunk\/<\/td><td>Main development line<\/td><td>Frequent commits<\/td><td>Default integration branch for active work<\/td><\/tr><tr><td>branches\/feature-x<\/td><td>Isolated feature or release work<\/td><td>Temporary or long-lived<\/td><td>Created to avoid destabilizing trunk<\/td><\/tr><tr><td>tags\/v1.0.0<\/td><td>Release snapshot marker<\/td><td>Usually no further edits<\/td><td>Immutable by convention, used for reproducible releases<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Create a branch from trunk<\/span>\nsvn copy https:<span class=\"hljs-comment\">\/\/svn.example.com\/repos\/app\/trunk \\<\/span>\n         https:<span class=\"hljs-comment\">\/\/svn.example.com\/repos\/app\/branches\/release-1.0 \\<\/span>\n         -m <span class=\"hljs-string\">\"Create release branch\"<\/span>\n\n<span class=\"hljs-comment\"># Create a tag from trunk<\/span>\nsvn copy https:<span class=\"hljs-comment\">\/\/svn.example.com\/repos\/app\/trunk \\<\/span>\n         https:<span class=\"hljs-comment\">\/\/svn.example.com\/repos\/app\/tags\/v1.0.0 \\<\/span>\n         -m <span class=\"hljs-string\">\"Tag v1.0.0\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Update vs commit vs \u201csynchronize with repository\u201d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Update<\/strong> and <strong>commit<\/strong> are core SVN operations. \u201cSynchronize with repository\u201d is often a GUI\/client phrase that combines checking incoming and outgoing changes, then reconciling them.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Operation<\/th><th>Direction<\/th><th>What it does<\/th><th>Common command<\/th><\/tr><\/thead><tbody><tr><td>Update<\/td><td>Repository \u2192 working copy<\/td><td>Brings local files up to latest revision<\/td><td>svn update<\/td><\/tr><tr><td>Commit<\/td><td>Working copy \u2192 repository<\/td><td>Publishes your local changes as a new revision<\/td><td>svn commit -m &#8220;message&#8221;<\/td><\/tr><tr><td>Synchronize<\/td><td>Both (workflow concept)<\/td><td>Review incoming and outgoing changes, resolve conflicts, then update\/commit<\/td><td>Client-dependent wording<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"mermaid\">\nflowchart TD\n    A[Edit working copy] --> B[Run svn status and svn diff]\n    B --> C[Run svn update]\n    C --> D{Conflicts found}\n    D -- Yes --> E[Resolve conflicts]\n    D -- No --> F[Run tests]\n    E --> F[Run tests]\n    F --> G[Run svn commit]\n    G --> H[New repository revision]\n<\/pre>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Typical daily cycle<\/span>\nsvn status\nsvn diff\nsvn update\n<span class=\"hljs-comment\"># resolve conflicts if any<\/span>\nsvn commit -m <span class=\"hljs-string\">\"Describe what changed and why\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">How to create and apply a patch in SVN<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Patch workflows are useful when you need to share changes without direct commit access.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Create a patch from your working copy changes<\/span>\nsvn diff &gt; fix.patch\n\n<span class=\"hljs-comment\"># Apply patch with SVN client support<\/span>\nsvn patch fix.patch\n\n<span class=\"hljs-comment\"># Alternative with system patch tool<\/span>\npatch -p0 &lt; fix.patch<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Handling conflicts and overriding local files with repository versions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># See changed and conflicted files<\/span>\nsvn status\n\n<span class=\"hljs-comment\"># Discard local edits recursively<\/span>\nsvn revert -R .\n\n<span class=\"hljs-comment\"># Pull clean repository state<\/span>\nsvn update<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For already-marked conflicts, you may resolve by accepting repository content where appropriate:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-bash\">svn resolve --accept theirs-full -R .\nsvn update<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Backup and restore process in SVN<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Interviewers often expect two backup patterns: <strong>hotcopy<\/strong> for fast full copies and <strong>dump\/load<\/strong> for portable backups and migrations.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Full repository backup<\/span>\nsvnadmin hotcopy \/<span class=\"hljs-keyword\">var<\/span>\/svn\/project \/backup\/project-hotcopy\n\n<span class=\"hljs-comment\"># Logical backup<\/span>\nsvnadmin dump \/<span class=\"hljs-keyword\">var<\/span>\/svn\/project &gt; \/backup\/project.dump\n\n<span class=\"hljs-comment\"># Restore to a new repository path<\/span>\nsvnadmin create \/<span class=\"hljs-keyword\">var<\/span>\/svn\/project-restored\nsvnadmin load \/<span class=\"hljs-keyword\">var<\/span>\/svn\/project-restored &lt; \/backup\/project.dump<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Important: these commands run on server-side repository paths, not on a local working copy checkout.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to set up SVN and authentication (quick reference)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SVN is commonly served either through <code>svnserve<\/code> or Apache HTTP server with WebDAV SVN modules. The right choice depends on your access, security, and integration requirements.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Serving option<\/th><th>Strength<\/th><th>Typical auth approach<\/th><th>When teams choose it<\/th><\/tr><\/thead><tbody><tr><td>svnserve<\/td><td>Simple, lightweight<\/td><td>Built-in passwd\/authz files<\/td><td>Internal networks, straightforward setups<\/td><\/tr><tr><td>Apache + SVN modules<\/td><td>HTTP(S), mature integration<\/td><td>HTTP auth methods plus authz rules<\/td><td>Enterprise environments, centralized web auth<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Minimal svnserve setup example<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Create repository<\/span>\nsvnadmin create \/srv\/svn\/myrepo\n\n<span class=\"hljs-comment\"># Start svnserve daemon rooted at \/srv\/svn<\/span>\nsvnserve -d -r \/srv\/svn<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-ini\"><span class=\"hljs-comment\"># \/srv\/svn\/myrepo\/conf\/svnserve.conf<\/span>\nanon-access = none\nauth-access = write\npassword-db = passwd\nauthz-db = authz<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-ini\"><span class=\"hljs-comment\"># \/srv\/svn\/myrepo\/conf\/passwd<\/span>\n&#91;users]\nalice = strong-password\nbob = another-password<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-ini\"><span class=\"hljs-comment\"># \/srv\/svn\/myrepo\/conf\/authz<\/span>\n&#91;\/]\nalice = rw\nbob = r<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">10 SVN interview questions to practice<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>What is SVN, and how is centralized version control different from distributed models?<\/li><li>What are trunk, branches, and tags, and how are they used in release workflows?<\/li><li>What does \u201csynchronizing with repository\u201d mean in your client\/tooling context?<\/li><li>What is the difference between <code>svn update<\/code> and <code>svn commit<\/code>?<\/li><li>How do you generate and apply patches in SVN?<\/li><li>How do you handle merge conflicts during update?<\/li><li>How would you force local files to match repository state?<\/li><li>How do you design a practical trunk\/branch\/tag strategy?<\/li><li>How do you back up and restore an SVN repository?<\/li><li>How do you configure authentication and authorization for SVN access?<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Common pitfalls and best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Always run <code>svn update<\/code> before commit to reduce avoidable conflicts.<\/li><li>Treat tags as read-only by team policy.<\/li><li>Use clear, audit-friendly commit messages.<\/li><li>Back up repositories on a schedule and test restore procedures.<\/li><li>Use least-privilege authz rules (read-only where possible).<\/li><li>Do not run destructive commands like <code>svn revert -R .<\/code> unless you are sure local changes are disposable.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A practical, interview-focused guide to Subversion (SVN) concepts and commands. Learn how to explain trunk\/branch\/tag, update vs commit, conflict handling, patching, backup\/restore, and auth setup with confidence.<\/p>\n","protected":false},"author":1,"featured_media":3403,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[52],"tags":[641,647,766,507,1567,482,394,1561,1563,1566,395,1562,1564,1565,637,1568],"class_list":["post-372","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions-answers","tag-answers","tag-best","tag-interview","tag-list","tag-list-of-svn-interview-questions","tag-questions","tag-subversion","tag-subversion-interview","tag-subversion-interview-questions","tag-subversion-interview-questions-and-answers","tag-svn","tag-svn-interview","tag-svn-interview-questions","tag-svn-interview-questions-and-answers","tag-top","tag-top-svn-interview-questions"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=372"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/372\/revisions"}],"predecessor-version":[{"id":79247,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/372\/revisions\/79247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3403"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}