SVN Tutorial Introduction to SVN concepts and Best Practices
Version control system is designed to to show them you really are  Track your changes  Rollback mistakes without rolling on your rifle in  Experiment safely without breaking the “real” code  Collaborate sanely with both “Lone Wolves” and working despair base “Dream Teams” ◦ Directory/file renaming and versioning ◦ Automatic merge/merge tracking ◦ Atomic Commits Benefits
In Simple Steps this is what happens  Repository contains the combined code of all developers  Working copies are developers own files at same stage  Dev1/Dev2 saves his/her copy on repository after completing  All developers will always work on updated code on Repository  And Team can maintain versions How it Works? Repository Dev1 Working Copy Dev2 Working Copy
No collaboration and manual merging  Normal Project Everything you need to work in a team as a developer is automated  When Using SVN Your Project structure Project structure on svn Myproject /All Files Myproject / trunk /All Files / tags / branches File structure
Trunk Contains the main code Branch is an experimental version for any code changes Tag should not be modified or worked upon, its for saving a workable version of the project What is Trunk, Branch and Tag?
Indicators and their meanings
Check Out /Update Modifications Commit Tag •Use it for downloading the project code base for first time •Create a branch •Update the code base before start working •Start writing the code •Make sure you are working on branch •Don’t commit unfinished functionalities •Write message for every commit •Might get conflicts/collision with the files and line numbers, handled by devs •If the build is stable create a Tag •Or merge the branch you are working on with the trunk files Work flow of a team
  Based on your SVN client, you need to practice the following basic actions on the 'trunk' folder: Add / commit. Update / commit. Modify / Revert. Modify several files / commit all with same message. View revision graph / view log. Compare between versions / Show differences. Add folder recursively. Update local copy to specific revision not just head. Delete / commit – Delete / revert deletion. You need to get used for the icons on files for your favorite SVN client, you should find list in the help of the client software. Basic actions
 Continue to practice the following tasks: Lock – Modify – Unlock to prevent anyone from changing in file while you are modifying it. Export to be used when releasing for taking version. Try the blame feature to view changes for each line is done by whom. Basic actions
        Trunk will always contain the latest code do Small bug fixes on the trunk Always do update, before start working Avoid making Typos as it will affect the repository If you are doing lot of changes in the code or new modules / functionalities create a branch If Build(Branch) is stable merge it with trunk , and create TAG for saving that build version Before committing do a unit test Always write a meaning comment when you do a commit, ◦ Eg. Made changes in the print invoice : created ….. ◦ Branch creation or tag creation is manual, whole team takes a call on that Best Practices
Thank You

Using svn

  • 1.
    SVN Tutorial Introduction toSVN concepts and Best Practices
  • 2.
    Version control systemis designed to to show them you really are  Track your changes  Rollback mistakes without rolling on your rifle in  Experiment safely without breaking the “real” code  Collaborate sanely with both “Lone Wolves” and working despair base “Dream Teams” ◦ Directory/file renaming and versioning ◦ Automatic merge/merge tracking ◦ Atomic Commits Benefits
  • 3.
    In Simple Stepsthis is what happens  Repository contains the combined code of all developers  Working copies are developers own files at same stage  Dev1/Dev2 saves his/her copy on repository after completing  All developers will always work on updated code on Repository  And Team can maintain versions How it Works? Repository Dev1 Working Copy Dev2 Working Copy
  • 4.
    No collaboration andmanual merging  Normal Project Everything you need to work in a team as a developer is automated  When Using SVN Your Project structure Project structure on svn Myproject /All Files Myproject / trunk /All Files / tags / branches File structure
  • 5.
    Trunk Contains themain code Branch is an experimental version for any code changes Tag should not be modified or worked upon, its for saving a workable version of the project What is Trunk, Branch and Tag?
  • 6.
  • 7.
    Check Out /Update Modifications Commit Tag •Use itfor downloading the project code base for first time •Create a branch •Update the code base before start working •Start writing the code •Make sure you are working on branch •Don’t commit unfinished functionalities •Write message for every commit •Might get conflicts/collision with the files and line numbers, handled by devs •If the build is stable create a Tag •Or merge the branch you are working on with the trunk files Work flow of a team
  • 8.
      Based on yourSVN client, you need to practice the following basic actions on the 'trunk' folder: Add / commit. Update / commit. Modify / Revert. Modify several files / commit all with same message. View revision graph / view log. Compare between versions / Show differences. Add folder recursively. Update local copy to specific revision not just head. Delete / commit – Delete / revert deletion. You need to get used for the icons on files for your favorite SVN client, you should find list in the help of the client software. Basic actions
  • 9.
     Continue to practicethe following tasks: Lock – Modify – Unlock to prevent anyone from changing in file while you are modifying it. Export to be used when releasing for taking version. Try the blame feature to view changes for each line is done by whom. Basic actions
  • 10.
            Trunk will alwayscontain the latest code do Small bug fixes on the trunk Always do update, before start working Avoid making Typos as it will affect the repository If you are doing lot of changes in the code or new modules / functionalities create a branch If Build(Branch) is stable merge it with trunk , and create TAG for saving that build version Before committing do a unit test Always write a meaning comment when you do a commit, ◦ Eg. Made changes in the print invoice : created ….. ◦ Branch creation or tag creation is manual, whole team takes a call on that Best Practices
  • 11.