Vscode: Git stash not working since last update

Created on 8 Mar 2019  路  8Comments  路  Source: microsoft/vscode

Issue Type: Bug


  • VS Code version: Code 1.32.1 (05f146c7a8f7f78e80261aa3b2a2e642586f9eb3, 2019-03-08T00:46:10.898Z) & Code 1.33.0-insider
  • OS version: Linux x64 4.18.0-0.bpo.3-amd64
  • Git version: 2.11.0

Steps to Reproduce:

  1. Make changes
  2. CTRL + P -> Searching for "git stash" -> Execute command Git: Stash without message
  3. Error from vscode: Git: usage: git stash list [<options>]. Git log:
> git stash push
usage: git stash list [<options>]
   or: git stash show [<stash>]
   or: git stash drop [-q|--quiet] [<stash>]
   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
   or: git stash branch <branchname> [<stash>]
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
               [-u|--include-untracked] [-a|--all] [<message>]]
   or: git stash clear

I get the same error message when trying to add a stash message, console output:

> git stash push -m awesome-message
usage: git stash list [<options>]
   or: git stash show [<stash>]
   or: git stash drop [-q|--quiet] [<stash>]
   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
   or: git stash branch <branchname> [<stash>]
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
               [-u|--include-untracked] [-a|--all] [<message>]]
   or: git stash clear

I also get the same issue with stashing all (include untracked).


Does this issue occur when all extensions are disabled?: Yes


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 x 2464)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled
webgl2: enabled|
|Load (avg)|3, 3, 3|
|Memory (System)|31.36GB (3.44GB free)|
|Process Argv|--disable-extensions|
|Screen Reader|no|
|VM|13%|

Extensions disabled

git

Most helpful comment

@joaomoreno changed the stash command in https://github.com/Microsoft/vscode/commit/ae5bb9072496828a3336d3b59f956d1f1975bfc1. It was using save (now deprecated), and it's now using push (introduced in Git 2.13.1).

Upgrading Git should fix the issue for you.

Edit: It might make sense for VS Code to revert back to using save, for better compatibility.

All 8 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@joaomoreno changed the stash command in https://github.com/Microsoft/vscode/commit/ae5bb9072496828a3336d3b59f956d1f1975bfc1. It was using save (now deprecated), and it's now using push (introduced in Git 2.13.1).

Upgrading Git should fix the issue for you.

Edit: It might make sense for VS Code to revert back to using save, for better compatibility.

I think git 2.13.1 is not available under Debian 9

You could install it from source, but that's not really a solution for everyone.

Another option may be backports, but use this at your own risk.

Version 2.11 is over 2 years old and is actually no longer supported.

As mentioned above, the referenced change may be reverted/refactored by the VS Code team, depending on how many users are affected.

Cound there be a check before executing git stash what version git is on?

Something like if git -v === 2.11.1 { use legacy; } else { use new; }

Sorry for that @shiftgeist, but we wanna keep moving forwards... Unfortunately you must either upgrade git, use manual stash commands or create a custom command for yourself which just spawns git stash.

For everyone that might have the same issue and found this bug report.

As @glen-84 suggested you can get git 2.20.1 on Debian 9 with:

sudo apt-get install -t stretch-backports git

Keep in mind that using this is at your own risk, but whats the point when stashing does not work in vscode :smile:.

For everyone that might have the same issue and found this bug report.

As @glen-84 suggested you can get git 2.20.1 on Debian 9 with:

sudo apt-get install -t stretch-backports git

Keep in mind that using this is at your own risk, but whats the point when stashing does not work in vscode smile.

It worked fine for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sijad picture sijad  路  3Comments

biij5698 picture biij5698  路  3Comments

mrkiley picture mrkiley  路  3Comments

borekb picture borekb  路  3Comments

shanalikhan picture shanalikhan  路  3Comments