git reflog يسجل كل مكان كان فيه HEAD الخاص بفرعك — كل التزام وتبديل فرع وإعادة تعيين وإعادة ترتيب قاعدة، إلخ. إنها شبكة أمان لاستعادة الالتزامات "المفقودة" (بعد إعادة تعيين سيئة أو إعادة ترتيب قاعدة فاشلة أو حذف فرع) التي تبدو أنها اختفت لكنها لا تزال قابلة للاستعادة.
ما هو reflog
The REFLOG logs every movement of HEAD (and branch tips) in YOUR local repo:
→ every commit, checkout, reset, rebase, merge, etc. is recorded with a reference
→ it's LOCAL and includes commits not reachable from any branch (the "lost" ones)
→ Even if you reset/rebase away commits, reflog remembers where they were.
