git stash push -p -m <message>

Stash changes interactively with a custom commit message

This command allows you to stash changes interactively, selecting specific changes to include in the stash.

The -p flag stands for --patch and prompts you to select portions of each modified file to stash.

The -m flag stands for --message and lets you provide a custom commit message for the stash. You can enter a descriptive message within the double quotes after the -m flag to make it easier to identify the stash later.

This command is useful when you want to save partial changes before switching branches or when you want to stash specific modifications without stashing everything. You can use other variations of the command, such as omitting the -m flag to avoid specifying a message.

Sign in to enable bookmarking, reminders, progress-tracking and more...