Git / gerrit, push remote rejected no changes made

前端 未结 9 1603
说谎
说谎 2020-12-22 23:45

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)
         


        
9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 00:44

    It sounds like you are doing everything correctly as far as verifying you have made a change that Gerrit should pick up.

    git push origin master:refs/for/master

    Maybe this is the problem? If your changes aren't on your local version of the master branch, you aren't pushing your changes. Instead try:

    git push origin HEAD:refs/for/master

    HEAD is a shortcut that represents your current commit in git.

提交回复
热议问题