git 拉取所有分支(24)

为了拉取周立功awtk的所有分支,先拉取master分支,然后拉取其实分支。由于之前已拉取了1.5. 1.6. 1.7的分支,所有拉取部分分支时会报错。

 git clone https://gitee.com/zlgopen/awtk.git  
Administrator@MS-20180322BJUK MINGW64 /d/git/awtk (1.7)
$ git branch -r | grep -v "\->" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
Branch '1.0' set up to track remote branch '1.0' from 'origin'.
Branch '1.1' set up to track remote branch '1.1' from 'origin'.
Branch '1.2' set up to track remote branch '1.2' from 'origin'.
Branch '1.3' set up to track remote branch '1.3' from 'origin'.
Branch '1.3.1' set up to track remote branch '1.3.1' from 'origin'.
Branch '1.4' set up to track remote branch '1.4' from 'origin'.
Branch '1.4.1' set up to track remote branch '1.4.1' from 'origin'.
Branch '1.4.2' set up to track remote branch '1.4.2' from 'origin'.
Branch '1.4.3' set up to track remote branch '1.4.3' from 'origin'.
fatal: A branch named '1.5' already exists.
fatal: A branch named '1.5.1' already exists.
fatal: A branch named '1.5.2' already exists.
fatal: A branch named '1.5.3' already exists.
fatal: A branch named '1.5.4' already exists.
fatal: A branch named '1.6' already exists.
fatal: A branch named '1.6.1' already exists.
fatal: A branch named '1.7' already exists.
Branch 'begin_frame' set up to track remote branch 'begin_frame' from 'origin'.
Branch 'bidi' set up to track remote branch 'bidi' from 'origin'.
Branch 'glyph_4bits' set up to track remote branch 'glyph_4bits' from 'origin'.
Branch 'gradient' set up to track remote branch 'gradient' from 'origin'.
Branch 'keyboard' set up to track remote branch 'keyboard' from 'origin'.
fatal: A branch named 'master' already exists.
Branch 'mbedtls' set up to track remote branch 'mbedtls' from 'origin'.
Branch 'multi_dirty_rects' set up to track remote branch 'multi_dirty_rects' from 'origin'.
Branch 'multi_layers' set up to track remote branch 'multi_layers' from 'origin'.
Branch 'opt_progress_circle' set up to track remote branch 'opt_progress_circle' from 'origin'.
Branch 'tkc-sep' set up to track remote branch 'tkc-sep' from 'origin'.

 

Administrator@MS-20180322BJUK MINGW64 /d/git/awtk (1.7)
$ git fetch --all
Fetching origin

  

最后查看本地分支与远程分支

Administrator@MS-20180322BJUK MINGW64 /d/git/awtk (1.7)
$ git branch  -a
  1.0
  1.1
  1.2
  1.3
  1.3.1
  1.4
  1.4.1
  1.4.2
  1.4.3
  1.5
  1.5.1
  1.5.2
  1.5.3
  1.5.4
  1.6
  1.6.1
* 1.7
  begin_frame
  bidi
  glyph_4bits
  gradient
  keyboard
  master
  mbedtls
  multi_dirty_rects
  multi_layers
  opt_progress_circle
  tkc-sep
  remotes/origin/1.0
  remotes/origin/1.1
  remotes/origin/1.2
  remotes/origin/1.3
  remotes/origin/1.3.1
  remotes/origin/1.4
  remotes/origin/1.4.1
  remotes/origin/1.4.2
  remotes/origin/1.4.3
  remotes/origin/1.5
  remotes/origin/1.5.1
  remotes/origin/1.5.2
  remotes/origin/1.5.3
  remotes/origin/1.5.4
  remotes/origin/1.6
  remotes/origin/1.6.1
  remotes/origin/1.7
  remotes/origin/HEAD -> origin/master
  remotes/origin/begin_frame
  remotes/origin/bidi
  remotes/origin/glyph_4bits
  remotes/origin/gradient
  remotes/origin/keyboard
  remotes/origin/master
  remotes/origin/mbedtls
  remotes/origin/multi_dirty_rects
  remotes/origin/multi_layers
  remotes/origin/opt_progress_circle
  remotes/origin/tkc-sep

  

posted @ 2022-06-06 17:04  嵌入式实操  阅读(765)  评论(0编辑  收藏  举报