哪个公司做网站最好,建设快照网站,微信订阅号网站开发,深圳建安公司入职要求自使用了git后#xff0c;就彻底喜欢上了#xff0c;深深体会到了自由的感觉#xff0c;记录一些简单的笔记和使用心得#xff0c;仅供留迹#xff0c;以备后查。。。 git clone 命令参数#xff1a; usage: git clone [options] [--] repo [dir]-v, --v… 自使用了git后就彻底喜欢上了深深体会到了自由的感觉记录一些简单的笔记和使用心得仅供留迹以备后查。。。 git clone 命令参数 usage: git clone [options] [--] repo [dir]-v, --verbose be more verbose-q, --quiet be more quiet--progress force progress reporting-n, --no-checkout dont 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 dont 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 template-directorydirectory from which templates will be used--reference repo reference repository-o, --origin name use name instead of origin to track upstream-b, --branch branchcheckout branch instead of the remotes HEAD-u, --upload-pack pathpath to git-upload-pack on the remote--depth depth create a shallow clone of that depth--separate-git-dir gitdirseparate git dir from working tree-c, --config keyvalueset config inside the new repository 参数挺多但常用的就几个 1. 最简单直接的命令 git clone xxx.git 2. 如果想clone到指定目录 git clone xxx.git 指定目录 3. clone时创建新的分支替代默认Origin HEADmaster git clone -b [new_branch_name] xxx.git 4. clone 远程分支 git clone 命令默认的只会建立master分支如果你想clone指定的某一远程分支(如dev)的话可以如下 A. 查看所有分支(包括隐藏的) git branch -a 显示所有分支如 * masterremotes/origin/HEAD - origin/masterremotes/origin/devremotes/origin/master B. 在本地新建同名的(dev)分支并切换到该分支 git checkout -t origin/dev 该命令等同于
git checkout -b dev origin/dev