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

Submodules (Git)

From TYPO3Wiki
Jump to: navigation, search


Git submodules are used in the TYPO3 Core for several system extensions, namely:

  • dbal
  • extbase
  • fluid
  • linkvalidator
  • version
  • workspaces

Working properly with Git submodules requires some additional knowledge. First of all make sure to have set up your environment properly, as explained in the contribution walkthrough. Please mind particularly the points about submodules.

Moving to a submodule

If you navigate through the TYPO3 source code down to a system extension managed as a Git submodule, you will arrive there in a perfectly transparent manner. However you will notice that the folder contains a ".git" file. Now check the local Git branches:

git branch

The result will be:

* (no branch)

Note that you are on no branch at all. This is called a "detached HEAD". You should not do any work at all while in this state! To check out what branches are available from the remore repository, type:

git branch -a

For the "dbal" system extension, for example, the result will be:

* (no branch)
remotes/origin/HEAD -> origin/master

Creating a local branch

The next step is to create a local branch to work in. You probably want to track a specific remote branch, so you could use a command like:

git checkout -b issueXYZ remotes/origin/DBAL_1-2

You can then work in this branch.

Pushing a changeset

Before pushing a change for review, check that your environment is indeed well set up:

git remote -v

should result in something like:

origin git:// (fetch)
origin ssh:// (push)

The important line is the second one, which indicates that changes will be pushed to Gerrit (

You can then proceed and push your changes as usual:

git push origin HEAD:refs/for/[branch]/[topic]

If you are unsure what refs exist for the remotes of this particular project, type:

git branch -r
git show-ref | grep origin

For the workspaces projects, this will result in:


Having problems?

Try the Troubleshooting page, there are some answers which are specific to the use of Git submodules.