Git

From 탱이의 잡동사니
Revision as of 12:53, 15 July 2015 by Pchero (Talk | contribs) (Created page with "== Overview == Git 사용법 정리. == clone == === branch clone === 특정 branch clone 하기<ref>http://stackoverflow.com/questions/1911109/clone-a-specific-git-branch</...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Git 사용법 정리.

clone

branch clone

특정 branch clone 하기[1].

$ git clone -b <branch> <remote_repo>

Example
$ git clone -b my-branch git@github.com:user/myproject.git

Alternative (no public key setup needed):
$ git clone -b my-branch https://git@github.com/username/myproject.git

With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches. Example, with OpenCV 2.4 branch:
$ git clone -b 2.4 --single-branch https://github.com/Itseez/opencv.git opencv-2.4

References

  1. http://stackoverflow.com/questions/1911109/clone-a-specific-git-branch