All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Multiple Branch Setup

From TYPO3Wiki
Jump to: navigation, search


When you clone a Git repository it contains all the branches present in the remote repository (the so-called "topic branches"). To switch from one branch to another you just need to git checkout; however this is not convenient, when you need to work on several branches at the same time. For this purpose you can just create as many clones as you need. However, if you want to save some bandwidth/space and only update the object database once for all of these clones, then the following instructions will help you setup multiple clones in a more efficient way.

Multiple working directories

The Git project provides a shell script for working with multiple working directories in the contrib/ directory.

Save it in a folder in your executable PATH and make sure it is executable.

Let's assume that you have created a clone of the TYPO3 repository this way:

 cd /usr/local/src/typo3/
 git clone git://

Your clone will be in /usr/local/src/typo3/TYPO3.CMS

git-new-workdir can now be used to create an additional clone that internally uses symbolic links to make work more efficient. By default, it will checkout the "master" branch, but you can supply an optional parameter to checkout another branch. The command:

 git-new-workdir TYPO3.CMS TYPO3_6-0-dev TYPO3_6-0

will create a new folder TYPO3_6-0-dev which contains a link to the same Git clone as "TYPO3.CMS" and has the release branch "TYPO3_6-0" already checked out.

You can now symlink to this folder to use the TYPO3 6.0 source code, while symlink to the "TYPO3.CMS" folder to work on the current TYPO3 "master" branch. Repeat as often as necessary with the other branches.

Unfortunately, this being a shell script, Windows users will only be able to use this on Cygwin. If someone knows how to perform a similar setup on Windows, please contribute!

You can then deploy a new branch/tag using:

git-typo3 TYPO3.CMS TYPO3-6.0.1 TYPO3_6-0-1

You can also use an git alias like "t3 = typo3 /path/to/TYPO3.CMS typo3_src" to keep you from having to type the path to your main clone. Very helpful if you develop your project using git and the typo3_src as a git submodule.