---
title: "Quick Start: Create a patch"
manual: "TYPO3 Core Contribution Guide"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3contribute:quickstart-patch"
source: "Quickstart/6-Patch.rst"
rendered: "2026-10-05T15:34:44+00:00"
---

# Quick Start: Create a patch {#quickstart-patch}

Please read [Quick Start: Create a patch - Intention](https://docs.typo3.org/permalink/t3contribute:quickstart-intent) for a longer text about an example
which kind of patch you could contribute.

Now with this example in mind, we have two modified files that we want to commit:

-   `typo3/sysext/backend/Classes/Form/Element/JsonElement.php`
-   `typo3/sysext/backend/Tests/Unit/Form/Element/JsonElementTest.php`

> [!NOTE]
> Ensure that your current working directory is the one
> used in previous steps, here `cd $HOME/work/TYPO3-Contribute`.

1.  Create a matching Forge Ticket

    Every patch needs to have a reason to be introduced. For this,
    you need to [create an issue on Forge](https://forge.typo3.org/projects/typo3cms-core/issues/new),
    see [the introduction to Forge](https://docs.typo3.org/permalink/t3contribute:forge-introduction). With our example you could create
    an issue like:

    > **Tracker**: Task
    >
    > **Subject**: The TCA Json FormEngine input needs a HTML5 attribute "input-type='json'"
    >
    > **Description**: (Describe why the attribute would be needed. Conclude with "I will create a patch for this" to let other know you'll be working on it)

    Now note down the number of your issue which you can see next to the
    title after creation, or in the URL (for example: `12345`).
1.  Ensure proper Git state

    Make sure you are in the right directory and following the previous
    steps, you should not have any other modified files:

    ****Check git status of the repository****

    ```bash
    git status
    ```

    The output should be:

    ```text
    On branch main
    Your branch is up to date with 'origin/main'.

    Changes not staged for commit:
    (use "git add <file>..." to update what will be committed)
    (use "git restore <file>..." to discard changes in working directory)
        modified:   typo3/sysext/backend/Classes/Form/Element/JsonElement.php
        modified:   typo3/sysext/backend/Tests/Unit/Form/Element/JsonElementTest.php

    no changes added to commit (use "git add" and/or "git commit -a")
    ```
1.  Add changed files to git stage:

    ****Add single files to git stage to be pre-selected for a commit****

    ```bash
    git add typo3/sysext/backend/Classes/Form/Element/JsonElement.php && \
        git add typo3/sysext/backend/Tests/Unit/Form/Element/JsonElementTest.php
    ```

    > [!NOTE]
    > Please ensure to only add files related to your change to the stage,
    > and discard unrelated files if reasonable.

    If your change is a breaking, a feature or deprecation, add a
    [Changelog entry](https://docs.typo3.org/permalink/t3contribute:changelog).
1.  Commit the files

    ****Create a git commit for files in the git stash****

    ```bash
    git commit
    ```

    Now your default terminal editor should open (usually `vi` or `nano`)
    and show this:

    ****The commit message template is loaded to help with commit message structure****

    ```text
    [BUGFIX|TASK|FEATURE|DOCS]

    Resolves: #
    Releases: main

    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # On branch main
    # Your branch is up to date with 'origin/main'.
    #
    # Changes to be committed:
    #       modified:   typo3/sysext/backend/Classes/Form/Element/JsonElement.php
    #       modified:   typo3/sysext/backend/Tests/Unit/Form/Element/JsonElementTest.php
    #
    ```

    ****Replace that to read:****

    ```text
    [TASK] Add HTML5 spec "input-type='json'" to TCA type=json

    Resolves: #12345
    Releases: main
    ```

    Close your editor with saving the commit message.
    For proper formatting and wording of a commit message, please read the
    details in [the commit message rules](https://docs.typo3.org/permalink/t3contribute:commitmessage).
1.  Push to Git repository

    ****Push the commit to configured remote push url (Gerrit)****

    ```bash
    git push
    ```

    ****Output:****

    ```text
    Enumerating objects: 11859, done.
    Counting objects: 100% (11859/11859), done.
    Delta compression using up to 10 threads
    Compressing objects: 100% (3900/3900), done.
    Writing objects: 100% (9919/9919), 3.06 MiB | 9.53 MiB/s, done.
    Total 9919 (delta 6847), reused 8104 (delta 5373), pack-reused 0 (from 0)
    remote: Resolving deltas: 100% (6847/6847)
    remote: Processing changes: refs: 1, new: 1, done
    remote:
    remote: SUCCESS
    remote:
    remote:   https://review.typo3.org/c/Packages/TYPO3.CMS/+/85025 [TASK] Add HTML5 spec "input-type='json'" to TCA type=json [NEW]
    remote:
    To ssh://review.typo3.org:29418/Packages/TYPO3.CMS.git
    * [new reference]         main -> refs/for/main
    ```
1.  Open review URL

    Open the given URL `https://review.typo3.org/c/Packages/TYPO3.CMS/+/85025`
    in your browser. You should now see your contributed patch!

    Also, automatically the Pipeline will now run server-side tests on
    your patch. Coding Guidelines will be addressed. This may lead to further
    patch modification.
1.  Announce your patch, gather feedback, improve

    Sometimes, feedback will come naturally to your patch, by people seeing
    it in the Gerrit patch pipeline.

    You are welcome to join the Slack channel `#typo3-cms-coredev` and
    [advertise your contribution for feedback](https://docs.typo3.org/permalink/t3contribute:announce-slack).

    You might want to check [Common code review checks](https://docs.typo3.org/permalink/t3contribute:common-review-checks) for things that
    people will review in your patch, hopefully leading to be merged.

    Depending on the feedback you may need to further refine your patch.

    You can do this by locally editing your files. Then it is **vital**
    that you do not perform a new git commit, but always only **amend your commit**:

    ```bash
    # ... edit files
    # ... commit all changed files
    git commit -a --amend
    git push
    ```

    See [Upload a new Patch Set](https://docs.typo3.org/permalink/t3contribute:lifeofapatch-improve-patch) for details.
1.  Cleaning up

    It's important to cleanup your local checkout after working on a change or
    reviewing it, to avoid stacking multiple changes into a **not intentional**
    relation chain. See [resetting](https://docs.typo3.org/permalink/t3contribute:quickstart-reset) for information
    on this.
1.  Special notes

    In some cases you may need to alter assets of the TYPO3 Core, like
    `TypeScript` or `SCSS`. See [building the assets](https://docs.typo3.org/permalink/t3contribute:building-assets) for how to build
    and then commit these files to your patch.
1.  Thank you!

    The TYPO3 community is thankful for you following this guide, and we
    hope once you have set up your development environment for it
    you can enjoy being an active contributor!
