这篇文章是介绍最近学到的一个新姿势--Chocolatey.
Posh-gitChocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind.
这次用Git来作为例子。
0x01
安装方式官网主页就有。
- Install Chocolatey
- In Command Prompt:
@powershell -NoProfile -ExecutionPolicy unrestricted
-Command "iex ((new-object
net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
&& SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
- In PowerShell
iex ((new-object
net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
- Install Posh-git
In PowerShell
C:\> cinst poshgit
- Others
In PowerShell
set-executionpolicy remotesigned
0x02
Posh-git is a set of PowerShell scripts which provide Git/PowerShell integration.
装了posh-git就能在PowerShell里完成git的各种操作,感觉还是很方便的。而且如果进入一个git文件夹还会自动识别出来,并标明分支等信息,如图。
以上
装了posh-git就能在PowerShell里完成git的各种操作,感觉还是很方便的。而且如果进入一个git文件夹还会自动识别出来,并标明分支等信息,如图。
以上

没有评论:
发表评论