Off the Wrong Branch
The last two commits were made on main by mistake: they belong on a new branch, pricing. Move them. pricing ends where main ends now, main ends two commits earlier, and you end on pricing.
Example 1
starts as
* cd6d5af (HEAD -> main) more pricing * b806536 start the pricing * 44553c0 add b * b527f18 first commit nothing to commit
ends as
on branch: pricing commits on main, newest first: add b first commit commits on pricing, newest first: more pricing start the pricing add b first commit staged: nothing changed, not staged: nothing untracked: nothing
Constraints
- 3 to 6 commits on
main - Nobody else has the two commits yet
- Nothing is edited or staged
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Only on the BranchMedium
- Pick the LatestMedium
- Publish the BranchMedium
- Settle the ConflictMedium
- Since the ReleaseMedium
- Take Back the CommitMedium
- Two Lines of WorkMedium
- Undo With a New CommitMedium