Git Clone (git-clone) Operation
(Redirected from git-clone)
Jump to navigation
Jump to search
A Git Clone (git-clone) Operation is a git command that is a clone operation (for cloning a repository into a new local directory).
- Context:
- …
- Example(s):
- a GitHub Clone Operation, such as:
git clone http://github.com/sbt/sbt-git
git clone git@github.com:username/repo.git
- …
- a GitHub Clone Operation, such as:
- Counter-Example(s):
- See: GitHub, Git Pull, Git Push.
References
2017
- https://help.github.com/articles/cloning-a-repository/
- Type git clone, and then paste the URL you copied in Step 2.
2015
- https://git-scm.com/docs/git-clone
- NAME: git-clone - Clone a repository into a new directory
- SYNOPSIS
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] [--recursive | --recurse-submodules] [--] <repository> [<directory>]
- DESCRIPTION: Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch -r), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.
After the clone, a plain git fetch without arguments will update all the remote-tracking branches, and a git pull without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "--single-branch" is given; see below).
This default configuration is achieved by creating references to the remote branch heads under refs/remotes/origin and by initializing remote.origin.url and remote.origin.fetch configuration variables.