Programming

Recovering a branch after force pushing (even main)

A mentee accidentally force-pushed, losing a README. Without a local copy, I recovered the commit via GitHub's CLI. By logging in and fetching the repository events, I found the lost commit's hash and was able to create a new branch, and rebase it onto main. A crucial notice: team members must also update their local branches. This experience shows the mutual learning in mentoring.