go get -u all

go get -u

go mod update

go get -u full_package_name
   go get -u github.com/... // ('...' being the wildcard). 

 go get -u github.com/orgA/...

 go get -d

   go get -u ./..

 

git config --global core.symlinks false

git config core.symlinks false

然并卵

find . -name .git -print -execdir git pull \;
find . -name .git -print -execdir git fetch --progress -v "origin" \;
find . -name .git -print -execdir git fetch --all \;
find . -name .git -print -execdir git submodule update --init --recursive \;
find . -name .svn -print -execdir svn update \;
find . -name .hg -print -execdir hg pull -u \;

 

bash
find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. pull origin master \;
PowerShell 
Get-ChildItem -Recurse -Directory -Hidden  -Filter .git | ForEach-Object { & git --git-dir="$($_.FullName)" --work-tree="$(Split-Path $_.FullName -Parent)" pull origin master }

ls | parallel -I{} -j100 '
  if [ -d {}/.git ]; then
    echo Pulling {}
    git -C {} pull > /dev/null && echo "pulled" || echo "error :("
  else
     echo {} is not a .git directory
  fi
'
git reset --hard HEAD
git clean -f -d
git pull



git fetch --all
git reset --hard origin/master
git reset --hard HEAD
git clean -f -d
git pull


1
#!/bin/bash
git fetch --all
for branch in `git branch -r --format="%(refname:short)" | sed 's/origin\///'`
  do git branch -f --track "$branch" "origin/$branch"
done


2
git fetch --all; for branch in `git branch -r --format="%(refname:short)" | sed 's/origin\///'`; do git branch --track "$branch" "origin/$branch" ; done ;


find . -name ".git" -type d | sed 's/\/.git//' |  xargs -P10 -I{} git -C {} pull



find . -name .git -print -execdir git pull \;
find . -name .git -print -execdir git submodule update --init --recursive \;

find . -name .svn -print -execdir svn update \;
#!/bin/sh
for dir in $(ls -d */)
do
  cd $dir
  echo "into $dir"
  if [ -d ".svn" ]; then
     svn update
  elif [ -d ".hg" ]; then 
      hg pull -u
  elif [ -d ".git" ]; then
     git submodule update --init --recursive
     git fetch --progress -v "origin"
     git fetch --all 
  fi
  cd ..
done

find . -name .git -print -execdir sh ~/1.sh \;

 

Linux: ls | xargs -I {} echo `pwd`/{}|xargs -I {} git -C {} pull

Windows: dir |select -Property Name|ForEach-Object -Process {"git -C "+$pwd.Path+"\"+$_.Name+" pull"}|Invoke-Expression
https://my.oschina.net/saintknight/blog/4818307

 

#!/bin/sh
basepath=$(cd `dirname $0`; pwd)
echo "\033[32mcurrent dir is: $basepath\033[0m"
for rop in $(find $basepath -type d  -name ".git" | cut -d. -f1)
do
        echo "\033[32mnow in: $rop\033[0m"
        cd $rop && git pull  && cd $basepath
done


————————————————
版权声明:本文为CSDN博主「BalterNotz」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/balternotz/article/details/52670135
#!/bin/sh
for dir in $(ls -d */)
do
  cd $dir
  echo "into $dir"
  if [ -d ".git" ]; then
     git pull
  elif [ -d ".svn" ]; then
     svn update
  fi
  cd ..
done

http://qianzui.github.io/blog/2013-12-13-script-to-update-git-project/
#!/bin/sh
basepath=$(cd $(dirname "${0}") && pwd)
#basepath=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
echo "更新目录:${basepath}";
for rop in $(find ${basepath} -type d -name .git | cut -d. -f1)
do
echo "更新目录:${rop}";
cd ${rop} && git submodule update --init --recursive
#        cd $rop && git pull  && cd $basepath
done
这个脚本有个bug 遇到 目录带 . 会断。。。可能和这一句有关
cut -d.

 

#!/bin/sh
basepath=$(cd $(dirname "${0}") && pwd)
#basepath=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
echo "更新目录:${basepath}";
for rop in $(find ${basepath} -type d -name .git)
do
#echo "更新目录1:${rop}";
# BashFAQ/100 echo "${tmp%%]*}"
# 带多个.的目录测试正常了
echo "更新目录2:${rop%.*}"
cd ${rop%.*} && git submodule update --init --recursive
#cd ${rop} && git submodule update --init --recursive
#        cd $rop && git pull  && cd $basepath
done
修正上面的bug

 

相关文章:

  • 2022-12-23
  • 2022-01-06
  • 2021-05-13
  • 2022-12-23
  • 2021-10-23
  • 2021-09-29
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2021-11-12
  • 2021-12-19
相关资源
相似解决方案