📌  相关文章
📜  github 下载所有分支 zip - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:17.701000             🧑  作者: Mango

代码示例1
#!/bin/bash
set -x #echo on
remote_url=$(git config --get remote.origin.url)
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
        branch_name=$(echo $branch| cut -d'/' -f 3)
    git clone -b $branch_name $remote_url $branch_name
done