sh 备用git repos,mu mu_repo

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 备用git repos,mu mu_repo相关的知识,希望对你有一定的参考价值。


# recreate script
# read .mu_repo and generate script to recreate repos (git clone/add remote)
while read repo; do cd $repo && for remote in $(git remote); do url=$(git remote get-url --push $remote); echo "mkdir -p $(dirname $PWD) && cd \$_"; [[ $remote == "origin" ]] && { echo "git clone $remote $url"} || {echo "git remote add $remote $url"} ; echo "cd -" ;done && cd - &>/dev/null ; done \
 < <(awk -F"=" '/^repo/{print $2}' .mu_repo) \
 > .git_repos.sh
 
# config only
# read .mu_repo and generate script to recreate repos (git clone/add remote)
while read repo; do cd $repo && for remote in $(git remote); do url=$(git remote get-url --push $remote); echo "$repo=$remote=$url"};done && cd - &>/dev/null ; done \
 < <(awk -F"=" '/^repo/{print $2}' .mu_repo) \
 > .git_repos

以上是关于sh 备用git repos,mu mu_repo的主要内容,如果未能解决你的问题,请参考以下文章

sh 转换git repo以使用git lfs

sh git repo特定用户:传递

sh git repo migration

sh git repo sync

sh 减少git repo大小

sh 从git repo安装包