Git: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
(Created page with "== Overview == Git 사용법 정리. == clone == === branch clone === 특정 branch clone 하기<ref>http://stackoverflow.com/questions/1911109/clone-a-specific-git-branch</...")
 
No edit summary
Line 20: Line 20:
</pre>
</pre>


== pull ==
=== pull all branches ===
<pre>
$ git pull --all
</pre>
== See also ==
* http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches - How to fetch all git branches
== References ==
== References ==
<references />
<references />


[[category:linux]]
[[category:linux]]

Revision as of 19:14, 18 July 2015

Overview

Git 사용법 정리.

clone

branch clone

특정 branch clone 하기<ref>http://stackoverflow.com/questions/1911109/clone-a-specific-git-branch</ref>.

$ 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

pull

pull all branches

$ git pull --all

See also

References

<references />