Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 938 Bytes

20210909090509-rewriting_history.org

File metadata and controls

37 lines (29 loc) · 938 Bytes

Rewriting history

See also:

Splitting commits

The last commit

Just reset and commit the individual pieces.

git reset HEAD~

So, what is the difference between the caret and tilda?

Commits older than the last one

  1. Use interactive rebase against the commit you want to split.
    git rebase -i COMMITSHA1~
        
  2. Choose to edit the commit on the interactive screen.
  3. Reset…
    git reset HEAD~
        
  4. Commit the individual pieces.
  5. Continue the rebase (eg, git rebase --continue)