Quick Start: Set up Git repository

  1. Init directory and clone Repository

    Create contribution folder and clone TYPO3 into a it
    mkdir -p $HOME/work/TYPO3-Contribute && \
        cd $HOME/work/TYPO3-Contribute && \
        git clone https://github.com/typo3/typo3.git .
    Copied!
  2. Set up Git specifics

    Set up git user meta data and repository
    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
    Copied!
    Configure recommended git options only for the repository
    git config branch.autosetuprebase remote
    Copied!
    Install hooks and git commit template
    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
    Copied!