First aid: getting work back

Here you break your own history on purpose and put it back: you stash an unfinished edit, wipe an extra commit with git reset --hard, find its hash in git reflog and move the branch back onto it. At the end you step into a detached HEAD and walk out again. Everything is local: the sandbox has no network and needs none.

What is already set up

The sandbox is nearly empty. The commit name and email are already configured (Anna Petrova), and ~/notes holds a repository with three commits and a three-line report.txt. Besides main there is a branch draft: it sits on the same commit and exists only to give you somewhere to switch to. There is no remote repository anywhere and no internet inside the conta

Locked

The rest of this lesson is part of a paid course

You are reading the open part. Buy the course to unlock the whole lesson and its lab.

See the course