Wednesday 13 March 2024

The Git & Github Bootcamp Part 7- Master on essentials and the tricky bits: rebasing, squashing, stashing, reflogs, blobs, trees, & more!


The Power of Reflogs - Retrieving “Lost” Work

1. Introducing Reflogs

Reflogs are a mechanism in Git that records updates to refs (branch heads, tags, etc.), effectively logging every state your repository has been in. This includes commits, merges, and even failed attempts at rewriting history.

2. The Limitations of Reflogs

Reflogs are local to your repository; they are not shared when you push or pull changes. They’re meant for recovering local changes that may have been lost or mistakenly altered. Additionally, entries in reflogs expire after a certain period (default is 90 days for commits that can no longer be reached and 30 days for reachable commits).

Read more »

Labels: