0

I found some topics about this, but they were helping for commits that were made just now and are still the last commits in the repository. My situation is that the commit is old. The git repository looks like that:

    ^
    ^
    | "master" latest commit
    | 11 other commits
    | merge branch "master"
    | 5 other commits
    | merge branch "master"
    | 2 other commits
    | merge branch "master"
    | THE commits which name I wish to change

All of these commits have been pushed. So it is deep down. I would appreciate if someone could give me suggestion of how to change the name and also, if the command involves HEAD~number to tell me the number (that is why I showed the current hierarchy condition of the repository).

Syspect
  • 921
  • 7
  • 22
  • 50
  • 1
    Your question is answered [here](http://stackoverflow.com/a/180085/1256452). Note carefully the warnings about editing published commits, and the comment about using `-p`. – torek Nov 04 '13 at 09:08
  • @torek - `$parent_of_flawed_commit` -> what exactly is this one. Is it the hash of the commit, before the the flawed commit ? – Syspect Nov 05 '13 at 08:34
  • 1
    Yes - or you can use the `^` notation, e.g., if the commit to replace (which then replaces all subsequent commits as well) is `badcafe` and its parent is `fabc0de` you can use either `fabc0de` or `badcafe^` to name the parent. – torek Nov 05 '13 at 09:12

0 Answers0