Important Changes to the Git repository of TYPO3 CMS

Categories: Development Created by Michael Stucki
The following article contains technical information about a recent change in TYPO3 CMS. It is important for developers and administrators who are working with the main Git repository of TYPO3 CMS.

Summary

As a result of the new team structure, the following changes have been applied to the former "TYPO3v4/Core" repository:
  • Git submodules of TYPO3 CMS have been merged into the main repository (more specifically, these sysexts: dbal, extbase, fluid, linkvalidator, version, workspaces). This means: No more dealing with "git submodule update", everything is in one single repository.
  • The repository for TYPO3 CMS has been renamed:
  • Old name: <link git: git.typo3.org typo3v4 core.git>git://git.typo3.org/TYPO3v4/Core.git
    New name: git://git.typo3.org/Packages/TYPO3.CMS.git
  • The old repository URL does no longer work. This means that any "git fetch" commands etc. will fail. This is intended to let you know that existing projects need to be updated.
  • Git history of the former submodules had to be rewritten for the merge. History of the main repository has not changed.
  • Our Github mirror has changed:
    Old mirror: <link https: github.com typo3 typo3v4-core>github.com/typo3/TYPO3v4-Core
    New mirror: <link https: github.com typo3 typo3.cms>github.com/TYPO3/TYPO3.CMS

How to update

Choose one out of these two solutions: 1) Start over with a new clone Delete the old working copy, and start over with a new clone of the new repository:
$ git clone git://git.typo3.org/Packages/TYPO3.CMS.git
2) Update existing repository (keep local changes) Set the new repository URL for the remote "origin" (change the remote name if needed)
$ git remote set-url origin git://git.typo3.org/Packages/TYPO3.CMS.git
Fetch contents
$ git fetch origin
Delete submodule contents (make sure there are no local only commits that you need to keep first, otherwise check the FAQ below)
$ rm -rf typo3/sysext/dbal typo3/sysext/extbase typo3/sysext/fluid typo3/sysext/linkvalidator typo3/sysext/version typo3/sysext/workspaces
Update to the latest commit (using rebase)
$ git rebase
Continue as usual (git pull / rebase / etc.)

FAQ

  • I am getting an error:
?  TYPO3core $ git:(master) git fetch origin-old
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
The repository has been moved to a new URL.
Check the info above and run "git remote set-url ...".
  • How to apply local commits in former submodules (not pushed to Gerrit yet)
$ cd typo3_src
$ git remote add old-extbase <url/path to your local Extbase repository>
# (if .git is missing in typo3/sysext/extbase/, search for it
# in .git/modules/typo3/sysext/extbase/ of the old
# TYPO3core repository)
$ git fetch old-extbase
$ git cherry-pick -Xsubtree=typo3/sysext/extbase old-extbase/<branch-name or commit-SHA1>
# Please note that -Xsubtree is only available since git version 1.7.5.
  • How to apply pending changes in Gerrit from former submodules?
This works like before, except that you need to add "-Xsubtree=typo3/sysext/<submodule> during "git cherry-pick FETCH_HEAD".
Example: Fetch a pending Gerrit change from the former Extbase repository.
$ git fetch git://git.typo3.org/TYPO3v4/CoreProjects/MVC/extbase refs/changes/84/21084/1 && \
git cherry-pick -Xsubtree=typo3/sysext/extbase FETCH_HEAD
  • Why are you doing this?
Git submodules were useful in a time when separate teams have been working on various parts of TYPO3 CMS. Over time, this has been simplified and we don't need the submodules any more.We think it's an advantage for all users, because submodules have often been a source of problems when working with Git.
  • What gets easier without submodules?
    • Releasing TYPO3 CMS
    • Seeing what changed between TYPO3 versions (via git log and in our ChangeLog) now will automatically include the changes from the former submodules
    • Applying a fix or introducing a new feature to the whole Core including the former submodules (now requires one single commit)
    • Reviewing and working on Security fixes which might apply to the former submodules
For further questions, please contact the <link http: forum.typo3.org index.php f _blank>CMS Core Team mailing list or consult the
TYPO3 server admin team <<link>admin@typo3.org>.