2023年7月7日发(作者:)
gitclone命令使⽤it clone 命令参数:usage: git clone [options] [--] [] -v, --verbose be more verbose -q, --quiet be more quiet --progress force progress reporting -n, --no-checkout don't create a checkout --bare create a bare repository --mirror create a mirror repository (implies bare) -l, --local to clone from a local repository --no-hardlinks don't use local hardlinks, always copy -s, --shared setup as shared repository --recursive initialize submodules in the clone --recurse-submodules initialize submodules in the clone --template directory from which templates will be used --reference reference repository -o, --origin use instead of 'origin' to track upstream -b, --branch checkout instead of the remote's HEAD -u, --upload-pack path to git-upload-pack on the remote --depth create a shallow clone of that depth --separate-git-dir separate git dir from working tree -c, --config set config inside the new repository参数挺多,但常⽤的就⼏个:1. 最简单直接的命令git clone 2. 如果想clone到指定⽬录git clone "指定⽬录"3. clone时创建新的分⽀替代默认Origin HEAD(master)git clone -b [new_branch_name] 4. clone 远程分⽀ git clone 命令默认的只会建⽴master分⽀,如果你想clone指定的某⼀远程分⽀(如:dev)的话,可以如下: A. 查看所有分⽀(包括隐藏的) git branch -a 显⽰所有分⽀,如: * master remotes/origin/HEAD -> origin/master remotes/origin/dev remotes/origin/master B. 在本地新建同名的("dev")分⽀,并切换到该分⽀git checkout -t origin/dev 该命令等同于:git checkout -b dev origin/dev
发布者:admin,转转请注明出处:http://www.yc00.com/news/1688703665a163845.html
评论列表(0条)