markdown Windows Powershell提示的快速设置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Windows Powershell提示的快速设置相关的知识,希望对你有一定的参考价值。
# Quick Setup for Windows Powershell Prompt
Set your PowerShell execution policy
```
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
```
Install Chocolatey
```
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
```
Install Chocolatey packages
```
choco install git.install conemu -y
```
Install PowerShell modules
`Install-PackageProvider NuGet -Force`
`Set-PSRepository -Name PSGallery -InstallationPolicy Trusted`
`Install-Module -Name 'posh-git'`
Add Git to PATH
```
# Permanently add C:\Program Files\Git\usr\bin to machine Path variable
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Git\usr\bin", "Machine")
```
Generate an SSH key
```
ssh-keygen -t rsa -b 4096 -C "your@email.com"
```
Copy the public key to clipboard for addition to GitHub profile.
```
Get-Content $env:USERPROFILE\.ssh\id_rsa.pub | clip
```
Test ssh connection to GitHub
```
ssh -T git@github.com
```
Configure Git settings
```
git config --global user.email "your@email.com"
git config --global user.name "Your Name"
git config --global push.default simple
git config --global core.ignorecase false
# Configure line endings for windows
git config --global core.autocrlf true
```
以上是关于markdown Windows Powershell提示的快速设置的主要内容,如果未能解决你的问题,请参考以下文章