in

DevOpsDevOps

SVN Tortoise Tutorial for Git, Local and also learn Mearging branches

SVN Tortoise Tutorial is free and open source subversion that is very useful for developers. Learn how to use SVN Tortoise in this tutorial quickly

svn tortoise tutorial

Hello there, this post on SVN Tortoise Tutorial is divided into two sections.  The first section we will show you how to get the repository using a URL.  The second section we will show you how to create a source control in the local machine that the developers can use to make the development more manageable.

Quick Links:

SVN Tortoise Tutorial for files from Git:

In this tutorial, we are going to see SVN Tortoise tutorial.

  • Please go to Tortoise SVN official website and download using the link given in the image.  Download the executable file and double click it.
svn tortoise tutorial
svn tortoise tutorial
svn tortoise tutorial
svn tortoise tutorial
  • Click on Next.
svn tortoise tutorial
svn tortoise tutorial
  • Click on Next again.
svn tortoise tutorial
svn tortoise tutorial
  • Click on Next again.
svn tortoise tutorial
svn tortoise tutorial
  • Click on Install.
svn tortoise tutorial
svn tortoise tutorial
  • Click on Finish.
svn tortoise tutorial
svn tortoise tutorial

The above steps will install the Tortoise SVN in the PC.

Restart the computer.

Now let us create a new folder called test.

svn tortoise tutorial
svn tortoise tutorial

Now we can right-click on the folder and choose SVN Check out.

In the URL of the repository field, we have to enter the URL of the repository that we want to check out.

svn tortoise tutorial
svn tortoise tutorial

Please know that the users can use any public GitHub repository for this purpose.  The Check out directory is the directory where the users right click to check out.

  • Now if we click on ok.  It will start downloading the files from the repository.
downloaded files
downloaded files
  • After the check out is complete, we can see the number of files that have been downloaded in the place where the image is shown.
  • Click on Ok.
downloaded files
downloaded files
  • As shown in the image, it will have the branches, tags and the trunk folder.
folders after checking out
folders after checking out
  • The trunk is where our main repository lies.
  • The tags are for the main releases.  It includes the alpha release, beta release and the final one.
  • The branches folder is for anyone to make any parallel changes in the trunk folder.

When we make changes to the file, we can see a red exclamation mark on the file.  The red exclamation mark means that the file has been modified.  To commit, go up one level on the folder and we will see a red exclamation mark on the folder.  Right click on the folder and click on SVN Update.  Now we can right click on the trunk folder and click on commit.  This will pop up a dialog box that shows the files that have been modified.

  • We can enter a commit message.
Enter the commit message
Enter the commit message
  • Then we can choose the files that need to be committed in the dialog box below that.
Choose files to commit
Choose files to commit
  • Now we can click on OK.
ok
ok
  • It will ask for the user name and the password.  Enter the username and password.
user name and password
user name and password

Here we go guys, we have seen the basic usage of the SVN tortoise tutorial.  Here we saw how to check out from a remote repository using the URL and also how to check in.

SVN Tortoise Tutorial for local repository:

After installing the SVN we will have a context menu in the file explorer.

context menu
context menu

We can create a new folder inside the repository folder.

Right-click the folder and select the TortoiseSVN option.

  • Now we can click on the Create Repository Here.
new folder
new folder
create new repository
create new repository
  • It will launch a dialog box that will prompt the user to create an arbitrary folder structure.
  • We do not have to create the folder structure so we click on Ok.
click ok
click ok
  • Then we can right click on the folder and select Check out.
svn check out
svn check out
  • Here we can enter the URL of the repository.  Be sure to enter the URL of the folder that we choose the create repository.
svn tortoise tutorial
svn tortoise tutorial
  • Enter the URL and now we can check out.
svn tortoise tutorial
svn tortoise tutorial
  • Once the folder has been checked out, we can see that there is a green check mark that indicates that there has been no modification to the content since the last SVN update.
unmodified project
unmodified project
  • We can create a new project into the repository folder.
  • Once we add the new project to the repository, we can see that tortoise SVN is showing a question mark because it is not sure if we want to add the new folder to the source control.
svn tortoise tutorial
svn tortoise tutorial
  • We can right click on the folder and go to Tortoise SVN option and add it.
add project
add project
  • We can select all the files and then we can click on Ok.
  • Now that we have added it to the repository, we now have to commit it to the repository.
  • We can right click on the folder and this time choose SVN Commit.
svn commit
svn commit
  • It will launch a dialog box where we can enter the commit message.
svn commit message
svn commit message
  • Now we can select ok and that will create the Revision 1.
first revision
first revision

Branch and Merge in Windows 10:

Let us imagine that we have a check in the project.  It is on the desktop named project.  It contains some sub-directories and some source code files.

This is the original version of the project files.  This project was checked out from the repository under the trunk branch.  When the users do the development work, they want to check it in without affecting the subversion.  To do that, we need to branch.

We right-click on the project and go to tortoise svn.  We select a branch tag.  We add the name of the branch as a subdirectory.

  • We have to switch the working copy to the new branch/tag
  • Now click ok.
  • That will create a working copy of the project that is pointed at the development branch.
  • Right-click anywhere to get the Tortoise SVN options.
  • Now select the repo browser option.
  • This will show the trunk copy with all the files.  And then it will also show the dev branch that will have the copy of the trunk.
  • Now the users can change the text in the files and also add a new file to the development branch.
  • Now the users can add it using the SVN add.  This will change the icon from the question mark to the plus sign.
  • Now the user can right-click the root folder and select commit.
  • This will open a new dialog box that will prompt the users to enter a commit message and click on commit.
  • This will commit the changes to the branch.
  • Before we go ahead and publish the code, we need to do a merge.
  • Right click on the folder and go to Tortoise SVN and select switch.
  • We delete the development branch after the trunk name.
  • Select fully recursive from the drop-down shown in the image.
  • We will click ok.
  • Now that we have made the change, we need to merge it to the trunk.
  • We right click and go to Tortoise SVN and select merge.
tortoise SVN merge
tortoise SVN merge
  • Select the merge two different trees.
merge different trees
merge different trees
  • Now that will launch the dialog box, where the users can enter the URI to the folders that they want to merge.
  • In the from goes the URI to the trunk and in the to go the URI to the to branch.
  • Now click next
  • Now click on Merge.

Now that we go to the project, we can see an uncommitted version of the project that is pointed to the trunk.

Conclusion:

In this post, we saw the SVN Tortoise Tutorial introduction.  We can use SVN Tortoise tutorial for subversion and it is a very powerful tool.  Here we also saw how to use this subversion for managing the project.  We also saw that we can use the SVN Tortoise Tutorial to manage the project that we create locally.  And finally, we learned how to merge a branch before deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *