Hi there ,
Welcome to my new blog post!There are a lot of tutorials about SVN.But they are mostly addressed to those who already know basics of it.So today I am going to share few basic things about SVN.
What is SVN?
We need to keep versions of our code so that to avoid any risk in future about version of software needed by the client.So SVN comes into picture. SVN is basically a product of collabnet but now it falls under Apache software. Full form of SVN is SubVersioN . So let’s see the need of SVN in detail.
Imagine a scenario where you are working on a file named john.java. And you need to share this code with your friend who is sitting in winterfell. So how will you do it?
Solution is simple…
You just need to have your repository url. And then you will be able to share your java code as easily as chewing a gum.
Firstly you will commit the data to the url → This will make the code available for your partner.
Then he just needs to go to same url and checkout the code committed by you.
Next time whenever any of you changes the code. It will be available to other person.
Now let’s see the functionalities →
- Version Control
These are main operations performed by SVN.
- Synchronize → Lets you keep in synchronization with repository at your SVN url. It shows outgoing and incoming changes to you. Then it’s totally your call to remove or keep the changes. You can either Update and overwrite or commit your changes.
- Update → You can have an updated copy of your code using this one. So that no conflicts occur.
- Commit → You can commit your code to make it available to all.
- Version Control → This helps to keep different versions of the same code.
- Merge →This let us merge the changes made by two different people in the same file .If there is any conflicts* then SVN asks us to resolve the conflicts. And then we can merge them.
- Show History → Lets us see the changes and their author.
- Compare → You can compare two different commits of same file to know which changes are conflicting. And then manually changing the code you will be able to commit properly.
*Conflicts → If x has done changes in john.java at line number 123 and y has changed lines 234 in the same file then this is conflict since SVN won’t understand which change to keep and which to discard.
And here are few links to answer your questions.
So guys this is all about SVN. Do ask any query in comment section below..
Feel free to give your feedback!!