来自这个 SO:How to recover a dropped stash in Git?
我想将这个 Linux 命令转换为 Windows 等价命令,或者这个命令可能在 Windows 上是语法正确的,不确定 $
和 |
:
gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
我已经尝试在我的 Windows Git Shell、Powershell 和 Cmd.exe 上运行这个 cmd,我的 cd
是一个 git 目录,Cmd.exe:
在 Git 外壳上:
这给了我以下错误:
我已经安装了 gawk:http://gnuwin32.sourceforge.net/packages/gawk.htm
并将C:\Program Files (x86)\GnuWin32\bin
添加到我的路径
环境变量
最佳答案
这是等效的 Windows PowerShell:
gitk --all $(git fsck --no-reflog | Select-String "(dangling commit )(.*)"| %{ $_.Line.Split(' ')[2] } )
关于linux - Windows 等效于此 gitk Linux 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30877535/