Sublime Forum

Can I stash a specific file?

#1

I sometimes stash specific files using

git stash push <path_to_file>

Is this possible through sublime merge?

If not I would appreciate a stash button next to the discard / stage or something like that.

0 Likes

#2

see Features Request: Stage file by filename

0 Likes

#3

Thanks for this, but this is about staging not stashing.

0 Likes

#4

Create a file “Diff Context.sublime-menu” in your package user directory and paste the following:

[
    {
        "caption": "Stash file",
        "command": "git",
        "args": {"argv": ["stash", "push", "$path"]}
    }
]

Now when you right click in the diff of a file in your working directory you can stash just this file.

4 Likes

#5

should be sublime-menu

1 Like

#6

Sweet, this worked thank you very much!

0 Likes