+ All Categories
Home > Education > SVN Basics

SVN Basics

Date post: 24-May-2015
Category:
Upload: shiva-somvanshi
View: 490 times
Download: 3 times
Share this document with a friend
Description:
Beginners guide to SVN. developed for training
Popular Tags:
38
SVN Tutorial Introduction to SVN concepts and Best Practices
Transcript
  • 1. Introduction to SVN concepts and Best Practices

2. Benefits Version control system is designed to Track your changes to show them you really are working Rollback mistakes without rolling on your rifle in despair Experiment safely without breaking the real code base Collaborate sanely with both Lone Wolves and DreamTeams Directory/file renaming and versioning Automatic merge/merge tracking Atomic Commits 3. How it Works? In Simple Steps this is the plan 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 versionsRepositoryDev1 Working CopyDev2 Working Copy 4. File structure No collaboration and manual merging Normal ProjectYour Project structure Myproject /All FilesEverything you need to work in a team as a developer is automated When Using SVNProject structure on svn Myproject / trunk /All Files / tags / branches 5. What is Trunk, Branch and Tag?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 6. Work flow of a team Check Out /UpdateModificationsCommitTag 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 Dont 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 7. Basic actions Based on your SVN client, you need to practice the following basic actions on the 'trunk or Branches 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, Refer the next Slide 8. Indicators and their meanings 9. 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 in Tags folder. Try the blame feature to view changes for each line is done by whom. 10. Best Practices 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 acall on that 11. Understanding the Functions in depth 12. Advance Functions 13. Examples 14. Examples Checkout 15. Examples: Update 16. Examples: Add 17. Examples : Changelog 18. Thank You


Recommended