GitEasy

« All commands

Save-Work Save your work and (by default) publish it to where the project is shared.

Read / Write GitEasy v1.5.3

Description

Save-Work is the main GitEasy command for preserving work. It runs three steps in one: it stages every change, records them as a saved point with your message, and then publishes the saved point to the project's published location unless you ask it not to.

Before publishing, Save-Work pulls down any peer updates and replays your saved point on top, so a teammate's recent push does not block yours. Any local changes are temporarily set aside and restored automatically.

Save-Work does several safety checks before touching anything: it refuses to run inside an unfinished merge, rebase, cherry-pick, revert, or bisect; it refuses to save while there are unfinished conflicts; and it tells you in plain English when something is missing.

When your work area has nothing new to save but you have saved-but-not-yet-published changes, Save-Work publishes those for you. When there is nothing local and nothing pending, it tells you "No changes to save."

With -BumpVersion, Save-Work also bumps the module manifest version (Major / Minor / Build / Revision) and prefixes your saved-point note with the new version number. Useful when you maintain a PowerShell module and want every saved point to carry a version stamp.

Each Save-Work run writes a self-contained log file. Successful runs log silently. Failures throw a plain-English message and point at the log file with the technical detail.

Recipes

Recipe 1
EXAMPLE 1
Save-Work 'Update README'
Recipe 2
EXAMPLE 2
Save-Work 'Local checkpoint before refactor' -NoPush
Recipe 3
EXAMPLE 3
Save-Work 'Add Search-History' -BumpVersion -BumpKind Minor

Notes

Safety:

Parameters

-Message optional String
The message that describes this saved point. If you omit it, Save-Work uses a default that includes the current timestamp.
-NoPush optional SwitchParameter
Save your work locally only. Do not publish.
-BumpVersion optional SwitchParameter
Before saving, find the .psd1 manifest in the active project and bump its ModuleVersion. The bumped version is also prefixed onto your saved-point message.
-BumpKind optional String
Which part of the version number to bump when -BumpVersion is set. One of: Major, Minor, Build, Revision. Defaults to Build.
-LogPath optional String
Override the directory where the diagnostic log for this run is written. Defaults to %LOCALAPPDATA%\GitEasy\Logs and can be overridden site-wide through the GITEASY_LOG_PATH environment variable.
-WhatIf optional SwitchParameter
-Confirm optional SwitchParameter

Was this page helpful? Report an issue or suggest an improvement →