Question
git restore 2.32: Will it fully replace git checkout and what are the remaining use‑cases?
Kavi Indigo
0 reputation · 24 Feb 2021, 09:14 UTC
11.3K views0
Goal
Determine whether Git’s 2.32 "git restore" command will eventually supersede all legacy "git checkout" functionality, and identify any scenarios that still require checkout.
Constraints & Uncertainty
- Official Git documentation acknowledges "git restore" as the preferred tool for file restoration but does not declare checkout obsolete.
- Existing automation scripts frequently use
git checkout -ffor forced updates and branch creation. - The transition of core.restoredefault remains unset, potentially affecting default restore behavior across platforms.
Specific Questions
- What concrete Git features or flags are still only available through "git checkout" and cannot be expressed via "git restore"?
- Is there an official roadmap or deprecation timeline for removing legacy checkout paths such as
--trackor--merge? - How should projects that rely on
git checkout -b newbranchmigrate to preserve both branch creation and working‑tree semantics in Git 2.32+?