Delete commits

  • china-richway2
    12th Nov 2013 Member 0 Permalink

    Deleting commits using git rebase

    How to perform those actions? (Assuming no conflicts is made)

  • jenn4
    12th Nov 2013 Member 0 Permalink
    No idea if this is what you are asking for, but: 1.) download the version of the source you want to revert back to. 2.) Re-commit that over the current project.
  • mniip
    12th Nov 2013 Developer 0 Permalink
    @jenn4 (View Post)
    seriously? that's not how you do it

    You can use git-revert to create a commit that undoes a commit, or git-reset to move the branch head (you'll need a force push then)

    EDIT: postimg fails at inline images, looking at what you drew,
    looks like you want

    git reset --hard 2
    git cherry-pick 5 6 7

    (You'd need to save the hash ids of 5, 6 and 7 because you won't be able to see them after you git-reset)
    Edited once by mniip. Last: 12th Nov 2013