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

Clone (Git)

From TYPO3Wiki
(Redirected from Git Clone)
Jump to: navigation, search

Get a clone of the repository

To get the source code of TYPO3, clone the repository git://git.typo3.org/Packages/TYPO3.CMS.git On the command line, you can use

shell script:
git clone git://git.typo3.org/Packages/TYPO3.CMS.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:

shell script:
git pull

Getting an older branch

To checkout an older branch, execute the following commands:

shell script:
git checkout TYPO3_6-1
git pull

For TYPO3 4.5 the command looks like this:

shell script:
git checkout TYPO3_4-5
git pull

Getting new tags

As new tags are not fetched automatically by git pull, you have to do this on your own:
shell script:
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:

shell script:
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.