Windows11下PowerShell配置Git

这篇具有很好参考价值的文章主要介绍了Windows11下PowerShell配置Git。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

介绍

Windows 11下powershell可以与git结合使用,不用再单独调出git Bash了。

git: https://git-scm.com/download/win

PowerShell与Git结合

第一步

以管理员身份运行PS;
powershell git,git,git,github,PowerShell,Windows11

第二步

在弹出的窗口里键入:Get-ExecutionPolicy 命令,按enter键;

如果返回“RemoteSigned”,则代表已经配置过了;如果没有配置过,则返回“Restricted”;
powershell git,git,git,github,PowerShell,Windows11

第三步

如果已经配置过,则直接退出就可以在powershell中使用Git了。

否则,
继续键入: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force 命令,按enter键;
powershell git,git,git,github,PowerShell,Windows11

第四步

添加posh-git模块,
需要键入:Install-Module posh-git -Scope CurrentUser -Force 命令,按enter键;
powershell git,git,git,github,PowerShell,Windows11

第五步

将模块导入PS里,
键入: Import-Module posh-git命令,按enter键;
powershell git,git,git,github,PowerShell,Windows11

第六步

设置默认加载,
键入: Add-PoshGitToProfile -AllHosts命令,按enter键;
powershell git,git,git,github,PowerShell,Windows11

第七步

开始在PowerShell中使用Git;会加载一定时间,键入git命令,会提示git的操作指南,代表可以正常使用;
powershell git,git,git,github,PowerShell,Windows11文章来源地址https://www.toymoban.com/news/detail-771573.html

参考

  • http://www.windows11.pro/5639.html

到了这里,关于Windows11下PowerShell配置Git的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Windows + Git + TortoiseGit + Github

    一、下载Git (Git For Windows)     1.1. Git下载地址:https://gitforwindows.org/     1.2. 默认安装即可(包名:Git-2.42.0.2-64-bit.exe) 二、下载TortoiseGit     2.1.TortoiseGit下载地址:http://tortoisegit.org/download/     2.2.可以不用下载安装语言包,直接用英文即可(TortoiseGit-LanguagePack-2.14.0.0-

    2024年02月07日
    浏览(32)
  • Windows下git和github的使用

    介绍windows下的git和GitHub使用。 github官网:https://github.com 自行创建即可。 登录,create repository新建仓库一个测试库readme,创建完成。 git官方网站:https://git-scm.com/ 选择Windows版本下载安装即可。 下载安装直接默认全部下一步即可 安装完成后,在任务栏可以看到已经存在这几个

    2024年02月06日
    浏览(23)
  • Windows11安装Git

    官网下载链接:Git - Downloading Package 根据自己电脑的系统选择版本下载 1、运行安装程序 运行下载的Git安装程序后弹出下图的安装界面,点击  Next  2、选择安装位置,然后点击Next  3、进入安装配置界面,选择自己所需要的配置,选择完成后,点击Next  注:配置项说明如下:

    2024年02月05日
    浏览(32)
  • Starting Windows PowerShell (启动 Windows PowerShell)

    Windows PowerShell is a scripting engine .DLL that’s embedded into multiple hosts. The most common hosts you’ll start are the interactive command-line powershell.exe and the Interactive Scripting Environment powershell_ise.exe . Windows PowerShell 是一个嵌入到多个主机中的脚本引擎 .DLL 。启动的最常见主机是交互式命令行 power

    2024年02月05日
    浏览(29)
  • git、gitlab、github在windows下通用的操作笔记

    前言:命令是在Git Bash 下输入的命令,GUI部分涉及到小乌龟git,可以自行安装,不同版本有差异,用git的新手也可以尝试 SourceTree 提供漂亮的图形化界面操作(但是卡顿坑多,需三思) 介绍git安装 Git的小乌龟GUI操作 Git bash的命令 主要提供方向不提供具体命令操作是啥,其实

    2024年02月12日
    浏览(33)
  • Windows PowerShell基础教程(1)——Windows PowerShell 简介

    Windows PowerShell基础教程(1)——Windows PowerShell 简介             PowerShell 开发代号为Monad,  是支持 Windows XP/Server 2003/Vista/Server 2008操作系统的脚本语言。包括 Cmd.exe 、SH、KSH、CSH以及BASH Unix在内的大多数外壳程序的操作方式都是在新的进程中执行命令或实用工具程序,并以

    2024年02月10日
    浏览(28)
  • git配置代理(github配置代理)

    命令行配置代理方式一 git config --global http.proxy http://代理服务器地址:端口号 git config --global https.proxy https://代理服务器地址:端口号 如果有用户名密码按照下面命令配置 git config --global http.proxy http://用户名:密码@代理服务器地址:端口号 git config --global https.proxy https://用户名:密

    2024年02月11日
    浏览(21)
  • Git配置&GitHub绑定

    title: Git配置GitHub绑定 date: 2022-10-05 22:58:34 tags: Hexo GitHub Tutorial Butterfly categories: Tool Git aplayer: true keywords: Git GitHub GitBash 下载 :搜索Git官网,下载64位setup,如Git-2.32.0-64-bit.exe 安装 :无脑下一步,Git Bash是Git的命令行,如果选了只GitBash,那在cmd中使用git会报’git’ 不是内部或

    2024年02月13日
    浏览(41)
  • windows系统git使用ssh方式和gitee/github进行同步

    在从github/gitee远程仓库获取代码时,除了使用https方式,我们还可以使用ssh连接的方式与远程仓库服务器通信,其好处是有时会比https更方便、稳定、快速。 和与普通的linux服务器连接一样,为了免去每次远程操作都要输入用户名和密码的苦恼,我们可以选择使用 密钥对 的方

    2023年04月18日
    浏览(48)
  • 【git】配置代理访问github

    参考大神的方法 没有解决。 GitHub访问加速 简直完美! C:Userszhangbin.ssh 报错 通过clash 一定要allow lan 一定有system proxy zhangbin@DESKTOP-1723CM1 MINGW64 /g/CDN/NET-EQ-DEV zhangbin@DESKTOP-1723CM1 MINGW64 /g/CDN/NET-EQ-DEV $ git clone https://github.com/TaoistKing/AudioPlc.git Cloning into ‘AudioPlc’… remote: Enumerati

    2024年01月25日
    浏览(28)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包