git clone Command parameter :

usage: git clone [options] [--] <repo> [<dir>]
-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 <template-directory>
directory from which templates will be used
--reference <repo> reference repository
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--separate-git-dir <gitdir>
separate git dir from working tree
-c, --config <key=value>
set config inside the new repository

There are a lot of parameters , But there are only a few commonly used :

1. The simplest direct order

git clone xxx.git

2. If you want to clone To the specified directory

git clone xxx.git " Specify the directory "

3. clone Create a new branch instead of the default Origin HEAD(master)

git clone -b [new_branch_name] xxx.git

4. clone Remote branch

git clone By default, the command will only create master Branch , If you want to clone A specified remote branch ( Such as :dev) Words , Can be as follows :

A. View all branches ( Include hidden )  git branch -a  Show all branches , Such as :

* master
remotes/origin/HEAD -> origin/master

B.   Create a new local ("dev") Branch , And switch to the branch

git checkout -t origin/dev The order is equivalent to :
git checkout -b dev origin/dev

git Share ( One )git clone More articles about

  1. Share | Git Some common commands

    lately , All project teams have started from svn to turn to Git In the near future, we will share some Git Common operation and use experience of : Let's first understand some commands that need to be used in our work : --------------------------- Git It's basically life ...

  2. Androidstudio Project sharing to Git@OSC trusteeship

    Androidstudio Project sharing to Git@OSC trusteeship . One . stay OSC Create repository for example , Create a AndroidStudy Warehouse , The steps are as follows : Enter the warehouse name Click the Create button , The warehouse can be created , As shown in the figure below ...

  3. Use EGit The plug-in will Eclipse Share existing projects with git@osc

    . . . . . Programmers must form a good habit of using version management tools , Even a project developed by yourself should be added to the version management tool . There are two main benefits of using version management tools : One is better management of multiple replicas , This advantage goes without saying : The other is ...

  4. Git From the code cloud Clone Code to local

    Git From the code cloud or Github Clone code locally 1. Download and install Git, Stupid next step, next step ... 2. To configure Git: 2.1. Choose what you want clone The path to the local : Right click --->$ Git Bash Her ...

  5. git Order git clone usage

    In the use of git For version control , To get a copy of a project (copy), We need to know the address of the project warehouse (Git URL). Git It can be used under many protocols , therefore Git URL Maybe ssh://, http(s):/ ...

  6. Git in pull and clone The difference between

    git pull git clone clone It's not local repository when , Remote repository Download the whole thing . pull It's local repository when , Remote reposi ...

  7. git get submodule after clone

    /********************************************************************************* * git get submodu ...

  8. git In the second quarter ----git clone And git tag

    @git Remote cloning (clone) Warehouse , Will be remote Engineering clone To local warehouse : The default clone is remote master Branch git clone ...

  9. git clone、git pull and git fetch Usage and difference of

    Statement : It's not easy to code words , Reprint please indicate the source , Welcome to discuss and exchange at the bottom of the article .Git Common command quick reference table Recently I studied in a study group AI Curriculum , All our learning materials and homework All put in gitlab On . Today, a little teammate from gitlab ...

Random recommendation

  1. Shell Basics - Environment variable configuration file

    Shell Basics - Environment variable configuration file source The configuration file perhaps . The configuration file : After writing environment variables to the configuration file , You need to log in again to take effect , It's about using source command , It will take effect directly The main configuration file : /etc/p ...

  2. Android The difference between different systems

    This article is from , The quotation must indicate the source ! Android The system is constantly upgrading , From basic to intermediate to advanced , Gradual upgrade is a key point of agile development of software engineering , In every version ...

  3. “CoreCLR is now Open Source” Reading notes

    The original English text :CoreCLR is now Open Source The reading notes are as follows : CoreCLR yes .NET Core Execution engine for , Features include GC(Garbage Collection), JIT( take CIL generation ...

  4. 02.Redis Master slave cluster Sentinel To configure

    1. Cluster environment 1.Linux Server list Use 4 platform CentOS Linux Server building environment , Its IP The address is as follows : ...

  5. Web Component article

    I got to know Web Component The concept of . ...

  6. Delphi Use in GDI+ Draw (1)

    Delphi Of VCL Class library , The default is GDI Drawing interface , This interface encapsulates Win32 GDI Interface , It can satisfy the basic drawing function , But if you want to achieve more advanced drawing functions , It's often more difficult ,GDI+ It's Microsoft. GDI And then a graphical interface ...

  7. Set up based on SSI(struts2,spring,ibatis) Of javaEE development environment

    Set up based on SSI(struts2,spring,ibatis) Of javaEE development environment Recently, there are many people who don't know how to build SSI(struts2,spring,ibatis) Of J2EE development environment , Here is a ...

  8. LoadRunner【 Chapter one 】 download 、 install 、 Crack

    loadrunner11 download loadrunner11 The size is 4g many , Compared with another open source performance testing tool jmeter Come on , It's very heavy , A lot of online , You can search , You can also click Add group on the right to get the installation package . loadru ...

  9. python requests + xpath Get the paging details page data and save it to txt In file

    Direct code , If you don't understand, please join the group discussion # *-* coding:utf-8 *-* #import jsonimport requestsimport pytesseractimport timeimport ...

  10. machine learning MLIA Learning notes ( 3、 ... and ) And KNN( Two ) Dating Examples of possibilities

    This is a KNN Another example of the algorithm , Calculation Dating The possibility of . import numpy as np import os import operator import matplotlib import ma ...