git checkout main
git pull origin main
$source = “D:\黑马大数据学习\crawler”
$dest = Join-Path (Get-Location) “crawler”
if (-not (Test-Path $dest)) {
New-Item -ItemType Directory -Path $dest | Out-Null
}
Copy-Item -Path $source* -Destination $dest -Recurse -Force
git add crawler/
git commit -m “更新 crawler 目录内容,覆盖远程中同名文件”
git push origin main