{"id":3029,"date":"2021-03-02T08:40:47","date_gmt":"2021-03-01T23:40:47","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=3029"},"modified":"2021-03-02T02:41:23","modified_gmt":"2021-03-01T17:41:23","slug":"github-clone-which-allows-you-to-download-a-specific-directory-or-less-of-a-repository-from-github-com","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2021\/03\/02\/github-clone-which-allows-you-to-download-a-specific-directory-or-less-of-a-repository-from-github-com\/","title":{"rendered":"GitHub.com\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u300cGitHub clone\u300d"},"content":{"rendered":"<div class=\"paragraph\">\n<p>\u5927\u304d\u306aGit\u30ea\u30dd\u30b8\u30c8\u30ea\u3092clone\u3059\u308b\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\uff0e\u6700\u65b0\u306e\u3082\u306e\u3060\u3051\u304c\u6b32\u3057\u3044\u5834\u5408\u306f <code>--depth<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4e00\u90e8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u304c\u6b32\u3057\u3044\u6642\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\uff0e\u305d\u3046\u3044\u3046\u3068\u304d\u306bGitHub clone\u3092\u4f7f\u3046\u3068\uff0c\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u3066\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/github.com\/HR\/github-clone\">HR\/github-clone: &#x2b07;&#xfe0f; \u2800git clone repo subdirectories<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-shell\" data-lang=\"shell\">$ pip3 install git+git:\/\/github.com\/HR\/github-clone#egg=ghclone <b class=\"conum\">(1)<\/b>\n$ ghclone <b class=\"conum\">(2)<\/b>\nUsage:\n  ghclone &lt;url&gt; [-t | --token=&lt;token&gt;]\n  ghclone (-h | --help)\n  ghclone (-v | --version)\n$ ghclone https:\/\/github.com\/torvalds\/linux\/tree\/master\/tools\/usb\/usbip <b class=\"conum\">(3)<\/b>\nCloning into 'usbip'...\ndone.\n$ cd usbip\n$ ls -A <b class=\"conum\">(4)<\/b>\n.gitignore  AUTHORS  COPYING  INSTALL  Makefile.am  README  autogen.sh  cleanup.sh  configure.ac  doc  libsrc  src  vudc\n$ git status <b class=\"conum\">(5)<\/b>\nfatal: not a git repository (or any of the parent directories): .git\n$ cd ..\n$ ghclone https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/torvalds\/linux.git\/tree\/Documentation\/usb <b class=\"conum\">(6)<\/b>\nInvalid GitHub URI<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"colist arabic\">\n<ol>\n<li>pip\u3067\u5c0e\u5165\u3059\u308b(\u3082\u3057PATH\u304c\u901a\u3063\u3066\u306a\u3051\u308c\u3070 <code>~\/.local\/bin<\/code> \u3092\u52a0\u3048\u308b)<\/li>\n<li>USAGE<\/li>\n<li>Linux Kernel\u306e\u4e00\u90e8\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/li>\n<li>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5185\u5bb9\u78ba\u8a8d<\/li>\n<li>Git\u7ba1\u7406\u306f\u3055\u308c\u3066\u3044\u306a\u3044<\/li>\n<li>GitHub\u4ee5\u5916\u306eGit\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u5931\u6557\u3059\u308b<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>GitHub.com\u306eAPI\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067GitHub.com\u4ee5\u5916\u3067\u306f\u4f7f\u3048\u307e\u305b\u3093\u304c\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u4f3c\u305f\u3082\u306e\u306bBitBacket\u3067\u540c\u69d8\u306e\u3053\u3068\u304c\u3067\u304d\u308b\uff0c\u300cbb-clone\u300d\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/g14n.info\/bb-clone\/\">bb-clone<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ ghclone -v\n1.2.0\n$ dpkg-query -W git python3-pip python3\ngit     1:2.20.1-2+deb10u3\npython3 3.7.3-1\npython3-pip     18.1-5+rpt1\n$ lsb_release -dr\nDescription:    Raspbian GNU\/Linux 10 (buster)\nRelease:        10\n$ uname -a\nLinux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU\/Linux\n$ cat \/proc\/device-tree\/model ;echo\nRaspberry Pi 3 Model B Rev 1.2<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u304d\u306aGit\u30ea\u30dd\u30b8\u30c8\u30ea\u3092clone\u3059\u308b\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\uff0e\u6700\u65b0\u306e\u3082\u306e\u3060\u3051\u304c\u6b32\u3057\u3044\u5834\u5408\u306f &#8211;depth \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4e00\u90e8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u304c\u6b32\u3057\u3044\u6642\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\uff0e\u305d\u3046\u3044\u3046\u3068\u304d\u306bGitHub  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[547,6,546],"tags":[586,603],"class_list":["post-3029","post","type-post","status-publish","format-standard","hentry","category-buster-raspberry-pi-os","category-linux","category-raspberry-pi-os","tag-git","tag-github"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/3029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=3029"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/3029\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=3029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=3029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=3029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}