Get a clone of the repository
To get the source code of TYPO3, clone the repository git://git.typo3.org/TYPO3v4/Core.git On the command line, you can use
git clone --recursive git://git.typo3.org/TYPO3v4/Core.git
Cloning via HTTP is currently not available.
Cloning downloads the entire TYPO3 repository. By default, the master branch (customarily known as "trunk" from SVN) is checked out. If you want the current development version of another branch (e.g. TYPO3 4.5), you have to checkout that branch (more info on Branch (Git)).
Getting recent changes
To update your local branch, execute the following commands inside your clone:
git pull git submodule update --init
Getting an older branch
To checkout an older branch, execute the following commands:
git checkout TYPO3_4-5 git pull git submodule update --init
For TYPO3 4.4 the command looks like this:
git checkout TYPO3_4-4 git pull git submodule update --init
As new tags are not fetched automatically by git pull, you have to do this on your own:
git fetch --tags
How to "SVN export" a Git repository
There is not such command in Git - it is not needed. All you have to do is:
- Checkout core.git
- Remove the subfolder .git (Your-Copy/.git)
rsync is a widely used tool to efficiently copy files. You can exclude the .git subfolder from being copied using --exclude:
rsync src/ dest/ --recursive --exclude '.git'
To delete files that don't exist in the destination folder, use the option --delete. This results in mirroring instead of copying.