Gerrit error when Change-Id in commit messages are missing

前端 未结 12 1223
北荒
北荒 2020-11-28 03:58

I set up a branch in the remote repository and made some commits on that branch. Now I want to merge the remote branch to the remote master.

Basically follows are my

12条回答
  •  天命终不由人
    2020-11-28 04:35

    1) gitdir=$(git rev-parse --git-dir);

    2) scp -p -P 29418 @gerrit.xyz.se:hooks/commit-msg ${gitdir}/hooks/
    

    a) I don't know how to execute step 1 in windows so skipped it and used hardcoded path in step 2 scp -p -P 29418 @gerrit.xyz.se:hooks/commit-msg .git/hooks/

    b) In case you get below error, manually create "hooks" directory in .git folder

    protocol error: expected control record
    

    c) if you have submodule let's say "XX" then you need to repeat step 2 there as well and this time replace ${gitdir} with that submodules path

    d) In case scp is not recognized by windows give full path of scp

    "C:\Program Files\Git\usr\bin\scp.exe"
    

    e) .git folder is present in your project repo and it's hidden folder

提交回复
热议问题