search

Home  >  Q&A  >  body text

git commits new changes to an old commit

The local git repository has a commit (not HEAD). I have newly modified the file and want to submit it to this commit instead of creating a new commit. Is there a corresponding command?

仅有的幸福仅有的幸福2812 days ago553

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-05-02 09:36:02

    I don’t think there is such a command. You cannot modify the submission content of historical commits. Otherwise, how to deal with the submissions based on this commit?
    You can only create a new branch on that commit and then submit it again

    reply
    0
  • Cancelreply