Git clone accelerated mirroring tool wogit

Time:2021-10-22

Git clone accelerated mirroring tool wogit

Wogit is a git clone image acceleration command line tool to solve the problem of slow clone in GitHub warehouse.

Through encapsulation and transparent transmission, wogit is consistent with git in terms of use except for several new parameters of image options. It can not only be used for clone acceleration, but also replace git for daily use.

install

npm i wogit -g

use

Consistent with git, basicallygitreplace withwogitthat will do

# from
git clone https://github.com/chalk/chalk.git

# ti
wogit clone https://github.com/chalk/chalk.git

#Other parameters remain unchanged, just like using git, such as
wogit clone https://github.com/chalk/chalk.git --depth=1

Mirror switching

Wogit uses cnpmjs image by default, usingwogit -hYou can view the mirror switching options at any time

➜ wogit -h
Usage: wogit [options]

Options:
  -V, --version   output the version number
  -Cn -- cnpm cnpmjs image (default)
  -FA -- fastgit fastgit image
  -Ge -- gitee image
  -GC -- gitclone image
  -GH -- GitHub uses the original GitHub image
  -h, --help      display help for command

such as

#Fastgit image
wogit clone https://github.com/chalk/chalk.git -fa
wogit clone https://github.com/chalk/chalk.git --fastgit

#Gitee image
wogit clone https://github.com/chalk/chalk.git -ge
wogit clone https://github.com/chalk/chalk.git -gitee

#Others are not the same

Note: not all warehouses have accelerated images. Please confirm whether to use them according to the prompt-ghForce direct use of GitHub.

This time it must be

If you feel useful, you can go to the GitHub warehouse for star support. Thank you.

explain

Wogit will onlyThe accelerated source is only used when the operation is clone and the remote is GitHub warehouse, other cases are transparent, so other operations other than clone are also supported, which can replace git for daily use.

Of course, wogit has some disadvantages——The command has two more letters

If you can’t accept the extra two letters, you can configure alias by yourself. I won’t elaborate on this. Examples are as follows

alias wo=wogit