
This cookie registers statistical data on users' behavior on the website for internal analytics. This cookie stores and updates a unique value for each visit to track page views. If you have any other strategy, I would like to hear about that. It pretty much depends on your unique development environment. Ideally, you do not merge from trunk to the tag.įinally, remember that there is no ideal branching and merging strategy. This will come in handy if a very minor patch has to be made on the release version when your trunk is temporarily dirty. I always use Tags to tag a release whenever a new release version is deployed. When you create a branch simply rename the folder from branch/branches to tag. When the developer branch or feature branch is ready for release, merge changes back from the branch to trunk. Because, after a couple of days conflict between trunk version and branch version can get out of hand and merging will practically be impossible. It is always beneficial to merge changes from trunk frequently. It is the responsibility of the team lead to merge changes from trunk to this feature branch on a regular basis. It is the responsibility of the developer to regularly (timeframe depends on your development environment) merge changes from trunk to his branch.Ĭreate a feature branch if 2 or more developers are going to work on a new feature that will take considerable time to complete. They have to create a branch.Įach developer must create his or her own branch if their code will take more time to program than your normal deployment cycle. If it takes more than 2 days, they are not allowed to directly change the code in the trunk. Any developer making changes to the trunk must be absolutely certain that his or her part can be coded, tested and is ready to deploy within 2 days (can vary depending on your length of deployment cycle). The code in trunk is always maintained as close to release state as possible. Trunk, branch, and tag are the 3 main divisions in subversion repository. With a team of 10 developers it will be a nightmare in the absence of a proper branching strategy. Meanwhile, simple modifications and patches are requested on a day to day basis in the Version 1.0.0.0.Įssentially, with the changing business needs you are required to do a deployment every other day or so i.e. You envision it will take couple of weeks to get that feature coded, tested and released. Couple of days after the release, you get a request for a new feature that must go as Version 1.1.0.0. Let us assume that on a day to day basis you use agile methodologies such as extreme programming or scrum and you have finally released a reasonably complex project with Version 1.0.0.0. You may need to adopt branching in many different scenarios. This blog aims to provide a simple branching and merging strategy to manage the code in a fast paced team development environment. To do so, simply press Push.Version control systems play a vital role in the success of a software development team.

Make sure the "Commit Range" option is selected.

On the next page, select the commit marked with fetched. Choose the "Selected commit(s) to HEAD" option. Here we’ll do this with rebase: Open svn.clone in SmartGit and select Branch | Rebase. This can be done with the Git rebase or Git cherry-pick operation. We now need to apply these commits on top of refs/heads/trunk branch in svn.clone.

Now svn.clone contains all commits of the master branch from git.repo. Remote: Total 9 (delta 0), reused 0 (delta 0) Remote: Compressing objects: 100% (3/3), done. $ git fetch /tmp/git.repo refs/heads/master:refs/heads/fetched Now you can transfer commits from your local Git repository at git.repo to your SVN repository at svn.clone: SmartGit will autodetect an existing trunk/branches/tags layout and, if one exists, configure Git to map SVN branches to Git branches. With SmartGit, clone svn://localhost into a new directory. $ svn mkdir svn://localhost/trunk svn://localhost/branches svn://localhost/tags -m "Initial structure." However, it’s highly recommended to use the aforementioned standard layout.

SmartGit can handle repositories with the standard trunk/branches/tags layout, as well as repositories without any specific layout (i.e. If you already have an SVN repository, create a directory for a new project in it and use the SVN URL of that directory instead of svn://localhost for the rest of this tutorial. Now your SVN repository can be accessed via svn://localhost. Then open svn.repo/conf/nf and set anon-access=write. If it doesn’t exist yet, create it and run svnserve to make it accessible: In the following, we will assume that you have a Git repository in a directory named git.repo, with 3 commits in the master branch.
