class Git::Commands::Stash::Push

Stash changes in the working directory

Saves local modifications to a new stash entry and rolls them back to HEAD (in the working tree and index). The command takes various options to customize what gets stashed.

@example Save all changes with a message

Git::Commands::Stash::Push.new(execution_context).call(message: 'WIP: feature work')

@example Stash only specific files

Git::Commands::Stash::Push.new(execution_context).call('src/file.rb', message: 'Partial stash')

@example Keep staged changes in index

Git::Commands::Stash::Push.new(execution_context).call(keep_index: true)

@example Include untracked files

Git::Commands::Stash::Push.new(execution_context).call(include_untracked: true)

@note โ€˜arguments` block audited against git-scm.com/docs/git-stash/2.53.0

@see Git::Commands::Stash Git::Commands::Stash for usage examples

@see git-scm.com/docs/git-stash git-stash documentation

@api private