The git stash list in VSCode reports an error 'error: unknown switch `e'' problem

        When editing multiple documents, you need to switch branches without uploading code, so you usually use 'git stash' || 'git stash save Message' for temporary storage. In later calls, 'git stash pop stash@{}' is usually used for call caching.

        When using 'git stash pop stash@{}' in VSCode, you usually encounter errors such as 'error: unknown switch `e'', as follows:

        This kind of problem is because in VSCode, curly braces are considered as code block execution identifiers in PowerShell. If you want to use them normally, you can escape them with backticks `: stash@`{0'}

eg:git stash pop stash@`{0`} 

git stash related commands

1.git stash

        Save uncommitted changes to the stack for subsequent recovery of the current working directory

2.git stash save 

       Same as git stash, the difference is that you can add information comments after save 

3.git stash list

        View stash cache list

4.git stash pop

        Pop the content in stash and apply it to the working directory corresponding to the current branch. but deletes the contents of the most recently saved stack

5.git stash apply

        Apply the stack content to the current directory without deleting the content in the stack, suitable for multiple branches

6.git stash drop+name

        Delete a stash in the stack

7.git stash show

        View the difference between the latest saved stash and the current directory in the stack

8.git stash branch

        Create a branch from the latest stash in it

9.git stash clear

        Clear everything in the stack

        

        

Guess you like

Origin blog.csdn.net/w1060436872/article/details/126381783