Git - git clone - 將遠端倉庫克隆拷貝到本地


索引:

目錄索引

參看代碼 GitHub:

git.txt

一、示例:

1 git clone https://github.com/liumeng0403/lm.solution.git

二、說明:

  1."clone" 部分

    該部分指明是對遠端已存在倉庫的克隆動作,遠端倉庫被克隆到本地后,在本地就是一個git倉庫,

    並且這個git倉庫自動默認追蹤克隆過來的遠端倉庫,如 local:dev-->remote:dev、local:master-->remote:master 等等。

  2."https://github.com/liumeng0403/lm.solution.git" 部分

    這部分是遠端倉庫的地址(URI) ,可根據實際情況替換為自己項目的遠端倉庫地址。

  3.語法

    git clone [--template=<template_directory>]

        [-l]

        [-s]

        [--no-hardlinks]

        [-q]

        [-n]

        [--bare]

        [--mirror]

        [-o <name>]

        [-b <name>]

        [-u <upload-pack>]

        [--reference <repository>]

        [--separate-git-dir <git dir>]

        [--depth <depth>]

        [--[no-]single-branch]

        [--recursive|--recurse-submodules]

        [--]

        <repository>

        [<directory>] 

     上面是一個完整的 git clone 語法語句,只有 “<repository>” 項部分是必須項,語法較為簡單,可自行谷歌查看每項具體含義。

 

 

 

 

                                         蒙

                                    2018-06-09 00:22 周六

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM