Tuesday, 27 October 2015

SVN interview questions and answers

SVN interview questions and answers

Question: What is SVN?
Subversion is an open source control system which is used to trace all the changes made to your source code.

Question: List out what all things should be stored in SVN repository?
  1. Source Code
  2. MySQL Queries
  3. Database Updates
  4. Project regarding important files
  5. Product Documents
  6. Minutes of Metting and Imp Email

Question: How to add SVN file?
svn add filename.php

Question: How to add SVN folder?
svn add foldername

Question: How to get Updates from SVN Repo
svn update

Question: How to delete file from SVN Repo?
svn delete filename

Question: How to get SVN Info?
svn info

Question: How to get SVN Log for a file?
svn log testFile.php

Question: How to check for modifications?
svn status -v PATH

Question: Difference between SVN commit and SVN update?
SVN commit:: Push (upload) the local changes to Repository.
SVN Update:: Get (download) the Repository changes files to local system.

Question: What is use of Revert in SVN?
Revert your local changes.
It have two types
1) Local Revert: It will delete all changes from files which you made after updates and before commit.
2) Repo Revert: Upload the changes to previous Repo.

Question: List out what is the best practices for SVN?
  1. Work from your own local work-space
  2. Commit small autonomous changes
  3. Use comment
  4. Validate the files you are committing, you actually changed
  5. Take Update before commit to the Repo.

Question: How to apply a patch in SVN ?
First we need to "Create Patch" by making changes and generating the .diff file. Then this .diff file can be applied to the new Code base using "Apply Patch".

No comments:

Post a Comment