0
Split-Path : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:1 字符: 16
+ Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
+                ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

Import-Module : 未能加载指定的模块“.\posh-git”,因为在任何模块目录中都没有找到有效模块文件。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:4 字符: 1
+ Import-Module .\posh-git
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (.\posh-git:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Pop-Location : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:23 字符: 1
+ Pop-Location
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

Start-SshAgent : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:25 字符: 1
+ Start-SshAgent -Quiet
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

picture

  1. I have installed Github for Windows but when I open the git shell, many things go wrong.

  2. I tried to reinstall it, but nothing has changed.

  3. When I changed the github for windows -Options -Default shell to Git Bash,everything is OK.

xenteros
  • 15,586
  • 12
  • 56
  • 91
叶小白
  • 49
  • 1
  • 1
  • 9
  • What version did you installed? – VonC Sep 04 '16 at 07:09
  • The version of github for windows is *Emus (3.2.0.0) 82770ca*, and Windows is Win8.1. – 叶小白 Sep 04 '16 at 11:02
  • Try with Git 2.10: unzip https://github.com/git-for-windows/git/releases/download/v2.10.0.windows.1/PortableGit-2.10.0-64-bit.7z.exe anywhere you want, add that unzip folder to your PATH, and type `bash -i --login`. – VonC Sep 04 '16 at 11:07
  • Well,you are right. Such a scheme is workable.And could you tell me why does the above situation appear? Thanks a lot. – 叶小白 Sep 04 '16 at 11:25
  • Not sure, but I have added the above recommendation as an answer. – VonC Sep 04 '16 at 11:35

1 Answers1

0

I am not sure of the version of Git you were using (or of your %PATH%) but using the latest portable Git should work:

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250