How to create a new Patchset in Gerrit?

后端 未结 3 1075
不思量自难忘°
不思量自难忘° 2021-02-01 08:21

I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide https://review.typo3.org/Documentation/install-quick.html

<
相关标签:
3条回答
  • 2021-02-01 08:52

    Step 1: Install commit-msg hooks for gerrit

    scp -p -P 29418 localhost:hooks/commit-msg .git/hooks/
    

    Step 2: Create normal commit and push (for Patchset1)

    for example:

    git add Server.java
    git commit -m "server added"
    git push origin HEAD:refs/for/master
    

    Step 3: After doing some changes to Server.java

    Finally to create new Patchset (Patchset 2)

    git add Server.java
    git commit --amend
    git push origin HEAD:refs/for/master
    

    Repeat step 3 for further Patches

    0 讨论(0)
  • 2021-02-01 09:09

    Don't add the Change-Id on your own. Install the commit-msg hook as described here. This will automatically create the Change-Id for you.

    If you want to improve a patch by uploading a new patch-set, use git-commit --amend and keep the Change-Id line as it is.

    You can see a description of the workflow here: http://wiki.typo3.org/Contribution_Walkthrough_with_CommandLine

    0 讨论(0)
  • 2021-02-01 09:13

    Even if you add Change id manually it should be last paragraph of your commit message.
    And the syntax should be :

    change ID : [change ID ]
    
    0 讨论(0)
提交回复
热议问题