Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

amend a specific commit

Testy Termite answered on May 13, 2022 Popularity 9/10 Helpfulness 1/10

Contents


More Related Answers

  • git commit amend without changing message
  • change git commit message
  • edit last commit message
  • git commit --amend choose editor
  • amend last commit message
  • git change commit author for all commits
  • git edit last commit message
  • git amend last commit message
  • change latest commit author
  • git commit amend
  • change commit message
  • added changes to a specific commit
  • git amend with previous commit
  • git change author of last 2 commits
  • amend commit
  • git amend commit message
  • change commit message git
  • change git commit message
  • git amend old commit
  • github change last commit message
  • Edit git commits
  • Amend The Most Recent Commit in git command
  • how to edit old commit message in git
  • change git commit message
  • how to change a commit message
  • git rename older local commit
  • amend commit change description
  • git commit --amend with commit id
  • git change an old commit message

  • amend a specific commit

    0

    For example, if your commit history is A-B-C-D-E-F with F as HEAD, and you want to change the author of C and D, then you would...

    Specify git rebase -i B (here is an example of what you will see after executing the git rebase -i B command)

    if you need to edit A, use git rebase -i --root

    Change the lines for both C and D from pick to edit

    Exit the editor (for vim, this would be pressing Esc and then typing :wq).

    Once the rebase started, it would first pause at C

    You would git commit --amend --author="Author Name "

    Then git rebase --continue

    It would pause again at D

    Then you would git commit --amend --author="Author Name " again

    git rebase --continue

    The rebase would complete.

    Use git push -f to update your origin with the updated commits.

    Popularity 9/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 11 2023
    Testy Termite
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    2
    Popularity 10/10 Helpfulness 4/10 Language shell
    Tags: commit co
    Link to this answer
    Share Copy Link
    Contributed on May 13 2022
    Fusinato
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.