Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Save JournalSnapshot

Nick Spreitzer edited this page Feb 17, 2020 · 8 revisions
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0

Save-JournalSnapshot

SYNOPSIS

Creates a snapshot of the current state of the journal, which can potentially be reviewed or reverted at a later time.

Alias: sjs

SYNTAX

Save-JournalSnapshot [[-Message] <String>] [-Location <String>] [<CommonParameters>]

DESCRIPTION

All journal-cli commands which alter the state of your entry files, such as by adding new entries or renaming tags, automatically create snapshots before and after making the change. However, you can also create manual snapshots at any time by using Save-JournalSnapshot. These snapshots can be reviewed or reverted at any time.

Under the hood, these snapshots are nothing more than git commits. journal-cli automatically creates a local git repository for tracking all changes to the journal. You can therefore review or revert every change ever made to your journal simply by using familiar git commands. Refer to the git integration page for further information.

NOTE: The git repository is never automatically pushed to a remote server.

EXAMPLES

Example 1

PS C:\> Save-JournalSnapshot

Creates a manual snapshot of the journal. If no changes have been made since the last snapshot, the command does nothing.

Example 2

PS C:\> Save-JournalSnapshot -Message "Edited an old entry"

Creates a manual snapshot of the journal, with the message "Edited an old entry". The message is used as the git commit message.

PARAMETERS

-Location

The root directory for the journal to search for entries. This is only required if no default journal location has been set, or to search a non-default location.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Message

A short message that describes the current state of the journal. This should be less than approximately 75 characters.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS