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 9117449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:53:55+00:00 2026-06-17T04:53:55+00:00

Made changes to a commit, performed commit amend. Do a push and I get

  • 0

Made changes to a commit, performed commit amend. Do a push and I get the error:

! [remote rejected] master -> refs/for/master (no changes made)

Checked the change ID in the commit message and its still a valid commit.

I’ve tried changing a file, checking it shows up as an alteration and then added to staging area and done another commit amend. Try the push again and getting the same issue. No idea on this one.

Edit: This is pushing to gerrit, not git directly.

I’m running:

git push origin master:refs/for/master

And the result of getting the details of origin are (with company details edited out):

$ git remote show origin
* remote origin
  Fetch URL: ssh://lytee@gerrit.mycompany.net:29418/myrepo
  Push  URL: ssh://lytee@gerrit.mycompany.net:29418/myrepo
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master rebases onto remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)
  • 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-06-17T04:53:56+00:00Added an answer on June 17, 2026 at 4:53 am

    This issue is due to the actions I’d performed previously. I was trying to push a new change, on top of a change which was still up for review, who’s parent also was up for review.

     Trunk ------ Parent A ----- Parent B ----- New change
    (merged)     (unmerged)     (unmerged)
    

    I had used cherry-pick to obtain these two changes locally (Parent A and Parent B), and then a third cherry-pick to get my change from a local branch before attempting to push. That is what caused the issue, because my personal change was essentially trying to re-write history.

    The correct process would be to only pull Parent B when at trunk. This automatically pulls up any commits between trunk and it (in this case just Parent A). Then cherry-pick my new change on top of that and push will work fine.

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

Sidebar

Related Questions

I am attempting to commit changes made locally to a remote repository using git-bash
make changes git commit 'made changes' -a git push origin make more changes git
I have local repository, and a remote bare repository. I've made changes to my
While working on Master branch, I forgot to create new branch. Made changes to
I reverted to a previous commit and made some changes. Now I want to
Say, I made many changes to my code and only need to commit a
I've been searching all day for a way to get changes made server-side (like
I made changes to my Vagrantfile (added config.vm.share_folder , config.vm.customize lines) and now I
I made changes to some files i had in a project (they were auto
I have recently made changes in some code that makes a char name field

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.