← All courses

Git: rewriting and rescuing history

Rewrite history without fear of breaking it: rebase, searching history, bisect and rescuing lost commits.

21 tasks · 1 question
  1. Set up a git aliaseasy
  2. Fix the last commit's messageeasy
  3. Undo a bad commit with revertmedium
  4. Annotated tag on the right commitmedium
  5. Export an author's commits to a fileeasy
  6. Pull a value out of historymedium
  7. Find the commit that added a linemedium
  8. Transfer a single commit with cherry-pickmedium
  9. Transplant commits with rebase --ontohard
  10. Squash a fixup commit via autosquashhard
  11. Add a line to an old commit with rebase edithard
  12. Reorder commits with rebasehard
  13. Drop an unwanted commit with rebasehard
  14. merge or rebaseinterview questionmedium
  15. Recover a lost commit via refloghard
  16. Rescue a commit from detached HEADmedium
  17. Find the first bad commithard
  18. Find the breaking commit with bisect runhard
  19. Add a working tree for a branchmedium
  20. Keep only one directory in the working treemedium
  21. Exclude a directory from git archivemedium
  22. Clean out only the ignored junkmedium