powerShell git 使用 以及循环本地目录脚本

powerShell git 使用 以及循环本地目录脚本

  1. git 安装
  2. 配置git的环境变量----cmd :git --version
  3. 安装NuGet 管理器—Install-PackageProvider NuGet -Force
  4. 引入NuGet管理器—Import-PackageProvider NuGet -Force
  5. 克隆posh-git 工程------ git clone https://github.com/dahlbyk/posh-git
  6. 安装运行 posh----进入posh-git 目录 运行.\install.ps1
  7. 编写脚本
$sourcFolder = Get-Location
$folderList = Get-ChildItem -Name ccbscf-*
Foreach($folder in $folderList)
{
    echo "---------------FETCH PORJECT NAME---------------$folder---------------"
	cd $sourcFolder/$folder
    git remote
	git fetch --all
}
cd $sourcFolder
发布了5 篇原创文章 · 获赞 1 · 访问量 2949

猜你喜欢

转载自blog.csdn.net/CookieMeng/article/details/89238771