I have currently switched working with SVN (Tortoise). This is my first encounter with SVN’s. So as usual for novice people like me, there arises many questions, for some we find convincing answers in internet and for some not. I belong to that category of developers where we try to write code, play with it, test it and then add it to the main project. You may say that is what branches is in SVN (I agree but still have some questions). I have read that normally people do the development part in the branches section and then merge the contents from branches->trunk before committing it to repository.
I have got few questions:
-
Can some one explain to me how to make my branches/branch folder my current working folder, so that I can test my written code and stuff like that, before this I used to work on my localhost recheck everything before uploading it to main server, I hope one can understand my problem. Right now trunk folder is working as my current dir.
-
How can I transfer the contents from the trunk to my branches/branch folder, just copy and paste or is there some other sophisticated way to do it.
I have recently updated the my local directory from repository where my local directory structure looks like
Project/
Code/
/trunk /branches (both in same directory)
All the necessary data is right now in trunk and the branches folder is empty. What is the better way to work with the branches/branch folder, create a new folder branch in branches dir or get the contents of trunk to branches and work it from there.
Any help or any useful links would be appreciated!
Thanks
In SVN this is called ‘switching’ your working copy. Right-click in the root of your working copy and select ‘Tortoise SVN’, ‘Switch’.
The easiest way to do this is to create the branch as a copy of your trunk. You can use the copy (branch/tag) functionality: ‘Tortoise SVN’, ‘Branch/tag’. You can also check the box at the bottom to automatically switch to this branch.
The git question: someone just posted a comment about ‘more modern VCS’ then deleted it. IMO Subversion does branching fine and is probably more approachable than git, but nowadays everyone seems to use git. Once you’re happy with VCS in general it’s probably in your interests to have a look at git.