ek9_git_stash
Reports status (stashed, popped, applied, dropped or nothing-to-stash) and the stash ref; mode:'list' returns stashCount and stashes; a conflicting pop keeps the entry (stashPreserved:true).
When to use it
'Set my changes aside for now' - one call with mode:'push' (or pop, apply, list, drop); never runs automatically, every stash move is explicit. The answer when ek9_git_switch or ek9_git_pull refused a dirty tree.
When not to use it
- work that is finished - record it with
ek9_git_commit. - throwing the changes away - use
ek9_git_restoremode:'discard'. - seeing what is dirty - use
ek9_git_status.
Details
mode:'push' parks the changes (message and includeUntracked apply); 'pop' restores and removes the entry; 'apply' restores and keeps it; 'list' returns stashCount and stashes[] {index, ref, message, branch}; 'drop' deletes an entry (destructive). index (default 0, the most recent) targets pop/apply/drop as stash@{N}; a missing entry is refused as no-stash-entry with the route.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
includeUntracked | boolean | Also stash untracked files (push only). Default false. | |
index | integer | Entry for pop/apply/drop, as in stash@{N}. Default 0 (the most recent). | |
message | string | Label for the entry (push only). | |
mode | string: push | pop | apply | list | drop | yes | push (park the changes), pop (restore and remove), apply (restore and keep), list, drop (delete an entry). |