Creating a SVN Repository using TortoiseSVN step by step explained
Table of Contents
SVN Repository:
Subversion is the abbreviation of SVN. We can not see a single project/team without a repository. Crowdsourced projects are maintaining their codebase/repository in cloud repositories like GitHub to track the source code changes.
What we are going to do today ?
We are going to create a SVN repository using a TortoiseSVN. TortoiseSVN is a software which helps to create and manage the repository using user interface instead of commands.
This may be very late to post here, but still it will help a lot. Because when I googled to find how to create a repository I could not find the correct helpful tutorials. So I struggled lot to create a repository. So posting here the step by step tutorial on Creating a SVN Repository using TortoiseSVN.
Prerequiste:
TortoiseSVN [Download and install it first before going further.]
Creating a SVN Repository using TortoiseSVN step by step explained below:
Step 1:
Create a folder in D drive named “Javadomain_Repository”,
D:\Javadomain_Repository
Step 2:
Right click on the newly created folder (Javadomain_Repository) and
select TortoiseSVN -> Create Repository here
Repository files will be created in Javadomain_Repository folder.
[Do not edit/delete any files].
Step 3:
Now again Rightclick on Javadomain_Repository folder and
TortoiseSVN -> Repo-browser
Now Rightclick on the Repository browser window and click create folder.
Step 4:
Now keep your source code/Project somewhere. We are keeping the source code in
“D:\My Projects” and my project folder name is “MyJavaProject“.
folder structure for your better understanding,
Step 5:
Now we are going to add the above project folder to our repository.
Great! We have successfully created a SVN repository using tortoiseSVN.
Step 6:
Now we are going to checkout the code from our repository. We have created a folder “javadomain” in D drive. [D:\javadomain].
Go into the javadomain folder and
Right click -> SVN Checkout
code checkout has been done successfully.
Step 7:
Now we are going to enter into the main part of the repositories. We are going to update some file and going to check in back into the repository now.
Original checkedout file:
[java]
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
[/java]
Now I have modified it like this,
[java]
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World! by Javadomain.in");
}
}
[/java]
Once you modify the file, it will be changed like this,
Once the file committed, it is changed to,
Now you can check the history of the file to track the changes like this,
Conclusion:
Today we have learnt below things,
1. What is SVN repository ?
2. Creating repository using tortoiseSVN
3. Adding projects to repository
4. Checkout the projects from repository to our folders
5. Modifying it and check in back
6. Tracking the history of the file based on the changes.
Happy learning!