Quick Notes84 words

Recovering data with Git — quick notes

Recovering data — quick notes

SituationCommand
Lost commit after reset/rebasegit reflog → checkout/reset
Deleted branchgit refloggit branch
One commit from elsewheregit cherry-pick
Undo a pushed commitgit revert
Restore a deleted filegit restore --source=<commit>
  • Reflog is local and expires — it saves your machine only.
  • Shared branch → revert (new commit). Never reset (rewrites history).

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free