Undo the Edit
config.txt was edited by mistake. Put it back the way it is in the last commit. If another file is edited too, that edit stays.
Example 1
starts as
* ee4decb (HEAD -> main) add notes * 0cc3958 add the config changed, not staged: config.txt notes.txt
ends as
staged: nothing changed, not staged: notes.txt untracked: nothing config.txt: mode=fast
Constraints
- Nothing is staged
config.txtis edited; one other file may be
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Unstage ItEasy
- What Is StagedEasy
- Bring Back the FileMedium
- Drop the Last TwoMedium
- Get the New WorkMedium
- Move the EditsMedium
- Off the Wrong BranchMedium
- Only on the BranchMedium