How do I push amended commit to the remote Git repository?

后端 未结 16 1646
深忆病人
深忆病人 2020-11-22 04:42

When I\'ve worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the

16条回答
  •  醉梦人生
    2020-11-22 04:45

    The following worked for me when changing Author and Committer of a commit.

    git push -f origin master

    Git was smart enough to figure out that these were commits of identical deltas which only differed in the meta information section.

    Both the local and remote heads pointed to the commits in question.

提交回复
热议问题