feat(git): GitWorkingCopy.discard() to drop local work and come back to the remote state #72
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
qa:preview
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quatrain/core!72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/71-git-working-copy-discard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #71
What
GitWorkingCopy.discard()drops the local work and comes back to the state of the remote:The fetch of
fastForward()moves to afetch()helper shared by both.Why
One commit per change, pushed at once and signed by the person who made it, needs a recovery when the remote moved in between: discard, apply the change again on the fresh state, push.
Tests
npx jest packages/git: 17 passed, 3 new (refused push then retry, empty remote, no remote).tsc --noEmitclean.🤖 Generated with Claude Code