GeekIBLi

git常用命令

2021-07-14

初始化本地仓库

git init
git add README.md
git commit -m "first commit"
git branch -M master
git remote add origin git@github.com:XXXXX
git push -u origin master

批量删除分支

远程:git branch -r| grep 'ss-1' | sed 's/origin\///g' | xargs -I {} git push origin :{}
本地:git branch -a | grep 'feature-re-1' | xargs git branch -D

Tags: git