250 likes | 401 Views
Version controlling means keeping track of a software system consisting of many versions and configurations well organized. version control is a tool for managing changes to a set of filesEach set of changes is saved as a new revision of the file.Allows users to recover old revisions reliably.Helps manage conflicting changes made by different users
E N D
Version Control And TortoiseSVN Nithin Narendra
Agenda • What is Version Controlling • What is a Version Control • Why we use it • How we use it • Tortoise SVN functionality
What Is Version Controlling • keeping track of a software system consisting of many versions and configurations well organized
What Is A Version Control • A tool for managing changes to a set of files • Each set of changes is saved as a new revision of the file • Allows users to recover old revisions reliably • Helps manage conflicting changes made by different users • Backup system
Why We Use • It works like ‘Save As’ function • Enables parallel development • Brings collaboration between developers • Maintains history of the whole project • Enables reversibility
How We Use? • Every time we make significant changes to the existing files, we save the ‘revision’ • Each revision is associated to a description and a date • It is a good practice to update before we commit to avoid possible conflicts • If a conflict arise, we can compare the files to resolve it
Tortoise SVN • Tortoise SVN is an easy to use version control software for Windows • Based on Apache Subversion • Free of cost • Can be used with any development tool • All the features are directly accessed from the windows explorer, it acts like a plug-in
The Repository • Also referred to as the a “depot” or “root” • The repository holds information including dates, labels, branches, versions, etc., • The repository saves the changes between versions every time but not the whole project there by saves space
Version Management In TortoiseSVN • All code resides in trunk • Code versions are detached in branches • Snapshots for releases are tagged
Trunk? • Trunk is the location where the stable code resides • It always have the latest version • We never directly make/commit changes to the trunk
Branch • In SVN terms, a branch is just a copy of a current files • Branch is copy of trunk on which the changes are to be made • After making changes to the branch it is updated back to the trunk
Tags • Tags are snapshots/pictures • Usually made on version branches • Can also be made on trunk • Are used to keep track what’s happened b/w change log
How do we use subversion • We can easily download and install the Tortoise SVN from ‘http://tortoisesvn.net/’ • Tortoise SVN provides all the features right in the windows explorer, you need not open any application to use it • After installation when ever you right click, the options of Tortoise SVN are readily available in the panel • To access a particular repository, Admin team will be responsible in granting access to certain developer/team
Cont.. • Create an empty folder in certain location where you would like to download project/files from the repository • Right click on the newly created folder, in the menu we see the SVN Checkout option
Cont.. • Clicking on SVN Checkout option as shown above pops out a configuration window • We provide the URL of the Repository where the original copy of the project is saved and click ‘ok’
Cont.. • When we check out, an authentication window pops up asking username and password(if any) for accessing the repository • Provide them and check the save authentication to avoid repeating this process
Cont.. • Files get synced to the folder from the repository • This will be the folder on which you work further • Revision 30 in the image indicates the current project had 29 versions previously
Cont.. • Folder with green check mark indicates the folder is in proper sync with the repository and is up to date
Cont.. • When we create a new file in the project, it needs to be added to the repository • We can do this by selecting the add option as shown aside
Cont.. • Any kind of change occuredto the file/folder can be observed with a red warning kind of sign on it • Newly added files are represented with a blue ‘+’ on it before it is checked in
Cont.. • After making changes to the project it needs to be committed to reflect the changes in repository • Right click on the folder and select SVN Commit
Cont.. • Select the files that need to be updated in the ‘changes made’ column of the window • Message window can take the comments related to the update made
Cont.. • Unless there occurs any errors, a window pops up as shown reflecting the changes applied to the repository
Cont.. • It is a good practice to update every time before you start working on a copy/commit your changes • This avoids most of the conflicts
Summary • Manageable file change history • Better collaboration b/w developers • Clearer release management • More then one version of same code base • Easier to rollback in case of emergency