/git-rebase

Just a tip for better commit management on git repositories :octocat:

Updating Commits on GitHub

  • With git log get the commit hash

    git rebase -i <commit hash>

  • Inside Vim editor, change 'pick' to 'edit' on commit that will be updated.

    from: pick de0e7ec added gh-pages

    to: edit de0e7ec added gh-pages

  • Update the data

    close Vim saving changes: qw

    user from commit: git commit --amend --author="username <user@email.com>"

  • Finish rebase!

    git rebase --continue

    git log and it's done!

*do it for each commit that have to be changed

;)


source article

written with StackEdit.