Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
CS foundations
/
Git's internal model
A bad commit is already on a protected branch used by teammates. Which default recovery p…
from Git's internal model
Git 2.43.0
intermediate
3 min
A bad commit is already on a protected branch used by teammates. Which default recovery preserves shared history?
Run `git reset --hard HEAD^` and force-push.
Delete and recreate the protected branch.
Create and review a `git revert` commit.
Expire all reflogs, then recommit the files.
Check
Ask AI about this kata
Report an error
next kata
After committing 10, staging 20, and editing 30, what does this script print?
Predict the output
A new version is available
Reload