class Git::Stash

Represents a single stash entry in a Git repository

This class is deprecated and will be removed in v6.0.0. Use the {Git::Repository} stash methods and {Git::StashInfo} instead: {Git::Repository#stash_push} replaces ‘Git::Stash.new(repo, message)` and returns a {Git::StashInfo}, or `nil` when there was nothing to stash.

@example Create a stash and inspect the result (deprecated)

stash = Git::Stash.new(repo, 'WIP: feature work')
stash.message  #=> "WIP: feature work"
stash.saved?   #=> true

@example The replacement

info = repo.stash_push(message: 'WIP: feature work')
info.message   #=> "On main: WIP: feature work"
info.nil?      #=> false

@deprecated Use {Git::Repository#stash_push} and {Git::StashInfo} instead

@see Git::Repository#stash_push

@api public