Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6894099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:44:25+00:00 2026-05-27T06:44:25+00:00

I am using gerrit. I used the following command $ cd .git/hooks $ scp

  • 0

I am using gerrit. I used the following command

$ cd .git/hooks
$ scp -P 29418 demo@localhost:hooks/commit-msg .
$ cd ../..

This adds the change-id to my commit message, however if I amend to a commit it creates a NEW change-id. So when I push back to gerrit it’s not adding the patch set, it’s creating a whole new review entry.

Any suggests please?

Found the answer, but stackoverflow won’t let me answer my own question.

So this was a complete error on my part.
When I was trying to commit
git commit –amend -m “Initial Commit”

I was inlining the commit message and that was wiping away the change-Id, thus giving me a new one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:44:25+00:00Added an answer on May 27, 2026 at 6:44 am

    commit-msg hook work that way:

    1. Check if you have change-id in your commit message.
    2. If not, generates one.

    If you type git commit --amend and edit commit message, you still have old change-id (it is good).

    But if you type git commit --amend -m "...." you have removed change-id, so gerrit generates new one.

    Rule of a thumb:
    Don’t use --amend -m with gerrit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Git Bash or MinGW Shell , if I put in a command with
I am trying to implement a 'git-flow' kind of workflow using Gerrit but I
I am using github and I am willing to start using Gerrit with it.
Using NSDateComponents I know how to get the day component, but this gives me
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
using file_get_contents , I open an Internet URL and get the contents of this
We a new gerrit 2.2.1 server using LDAP authentication in our corporate environment. We
We are thinking about using Jenkins as our CI server. I used to use
We have an automated build system configured using Jenkins, integrate with Gerrit. One of
using the jquery ui modal dialog , the background shades grey (i assuming this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.