Switch-Work Switch to another existing working area.
Description
Switch-Work moves into a different existing working area. Use it to return to the main working area or to inspect a previous task's branch.
The command refuses to switch when an unfinished merge, rebase, cherry-pick, revert, or bisect is in progress; when there are unfinished conflicts; or when there are unsaved changes that would be lost or carried into the destination. Save your work with Save-Work first, or use Save-Work -NoPush for a local checkpoint.
Each invocation writes a self-contained diagnostic log file. Successful runs log silently; failures throw a plain-English message and point at the log file with the technical detail.
Recipes
Switch-Work -Name main
Find-CodeChange; Switch-Work -Name giteasy-v2-refresh
Notes
Safety:
- Refuses to run during an unfinished merge, rebase, cherry-pick, revert, or bisect.
- Refuses to run while there are unfinished conflicts.
- Refuses to switch when there are unsaved changes in the active working area.
- Refuses to switch into a working area that does not exist.
Parameters
Was this page helpful? Report an issue or suggest an improvement →