Unstage It
draft.txt was staged by mistake. Take it out of the staging area, and keep its edit in the file. If another file is staged too, it stays staged.
Example 1
starts as
* 10ddbc7 (HEAD -> main) add notes * 0087070 add the draft staged: draft.txt notes.txt
ends as
staged: notes.txt changed, not staged: draft.txt untracked: nothing draft.txt: a b
Constraints
draft.txtis edited and staged; 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
- 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
- Pick the LatestMedium