IT系/リファレンス/Gitコマンド/git_clone

Last-modified: 2020-06-02 (火) 01:39:55

git clone

リポジトリを複製するコマンド。

用例

  • リモートリポジトリ「http://xxx/hoge.git」から「C:¥git\hoge」へクローン
    git clone http://xxx/hoge.git C:¥git¥hoge
  • リモートリポジトリ「http://xxx/hoge.git」からカレントフォルダへクローン
    git clone http://xxx/hoge.git
  • リモートリポジトリ「http://xxx/hoge.git」の「fuga」ブランチをカレントフォルダへクローン
    git clone -b fuga http://xxx/hoge.git

書式

git clone [options] <リモートリポジトリ> [ローカルパス]

公式によると以下の通り。

git clone [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
          [--dissociate] [--separate-git-dir <git dir>]
          [--depth <depth>] [--[no-]single-branch] [--no-tags]
          [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
          [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--] <repository>
          [<directory>]

options

/xxxx

etc.

説明

XXXX

関連

  • xxx

参考リンク

その他メモ

なにかあれば。