---
title: "Quick Start: Set up Git repository"
manual: "TYPO3 Core Contribution Guide"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3contribute:quickstart-git"
source: "Quickstart/3-Git.rst"
rendered: "2026-09-26T04:50:59+00:00"
---

# Quick Start: Set up Git repository {#quickstart-git}

> [!TIP]
> You may want to adapt some commands that are shown here.
> Copy them by using the copy icon in the code block, paste them
> in a raw text file or editor, adjust the values. Then copy it
> from there to paste it into your terminal again.

1.  Init directory and clone Repository

    ****Create contribution folder and clone TYPO3 into it****

    ```bash
    mkdir -p $HOME/work/TYPO3-Contribute && \
        cd $HOME/work/TYPO3-Contribute && \
        git clone https://github.com/typo3/typo3.git .
    ```
1.  Set up Git specifics

    > [!NOTE]
    > Remember that we use some conventions for username and email, see
    > [prerequisite assumptions](https://docs.typo3.org/permalink/t3contribute:quickstart-assumptions).

    ****Set up git user meta data and repository****

    ```bash
    git config user.name "John Doe" && \
        git config user.email "john.doe@example.com" && \
        git config remote.origin.pushurl \
            ssh://john-doe@review.typo3.org:29418/Packages/TYPO3.CMS.git && \
        git config remote.origin.push +refs/heads/main:refs/for/main
    ```

    ****Configure recommended git options only for the repository****

    ```bash
    git config branch.autosetuprebase remote
    ```

    ****Install hooks and git commit template****

    ```bash
    mkdir -p .git/hooks && \
      cp Build/git-hooks/commit-msg .git/hooks/commit-msg && \
      cp Build/git-hooks/unix+mac/pre-commit .git/hooks/ && \
      chmod +x .git/hooks/commit-msg && \
      chmod +x .git/hooks/pre-commit && \
      {
        echo '[BUGFIX|TASK|FEATURE|DOCS]'
        echo ''
        echo 'Resolves: #'
        echo 'Releases: main'
      } > $HOME/.gitmessage-typo3.txt && \
      git config commit.template $HOME/.gitmessage-typo3.txt
    ```
