
以下の操作を実行して、posh-git 1.1.0 を正常にインストールしました。
c:\Users\username> PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
c:\Users\username>
しかし、git リポジトリ内の git 情報に移動すると、コマンド ラインに何も表示されません。
C:\Users\username> cd .\source\repos\
C:\Users\username\source\repos> cd .\myproj\
C:\Users\username\source\repos\myproj>
何が間違っているのでしょうか?
答え1
posh-gitをインストールしても、posh-gitは自動的に使用されません。
posh-git をインストールしても、プロファイルに対して自動的に実行されるわけではありません。posh-git をインストールした後、posh-git powershell セッションの使用を開始するには、セッションにインポートする必要があります。次のコマンドを使用して、プロファイルが posh-git を自動的に使用するように設定できます。
C:\Users\username> Add-PoshGitToProfile
次に、PowerShell セッションを再起動します。その後、git 情報がコマンド ラインに表示されます。
C:\Users\username> cd .\source\repos\
C:\Users\username\source\repos> cd .\myproj\
C:\Users\username\source\repos\myproj [develop ≡]>
その他のオプションについては、posh-git の使用posh-git github リポジトリのセクション。