linux:git

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:git [2022/09/30 01:48] – [開発リポジトリなどを最新履歴のみ高速に複製する shallow clone] ともやんlinux:git [2023/09/01 13:18] (現在) – [参考文献] ともやん
行 1: 行 1:
 ====== Git - 分散型バージョン管理システム ====== ====== Git - 分散型バージョン管理システム ======
 +<WRAP logo>
 +| {{:linux:git-logo.svg?300|Git Logo}} |
 +| [[https://commons.wikimedia.org/wiki/File:Git-logo.svg|File:Git-logo.svg - Wikimedia Commons]] |
 +</WRAP>
  
 ===== リポジトリを複製 ===== ===== リポジトリを複製 =====
 +
 +==== フルクローン (full clone) [git clone] ====
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 17: 行 23:
 </WRAP> </WRAP>
  
-==== 開発リポジトリなどを最新履歴のみ高速に複製する shallow clone ====+==== シャロークローン (shallow clone) [git clone --depth 1] ==== 
 +開発リポジトリなどをビルド用に最新履歴のみ高速に複製する🤤\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 55: 行 62:
 </WRAP> </WRAP>
  
-通常の clome と同様に fetch できるように直すことは可能🤤\\+通常の clone と同様に fetch できるように直すことは可能🤤\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 106: 行 113:
 </WRAP> </WRAP>
  
-==== サブモジュールの最新履歴のみを shallow clone ====+==== サブモジュールのシャロークローン [--recommend --depth 1] ====
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 140: 行 147:
  * branch            b7f5d8d735b280fc77673c4a29f0436a92ca6660 -> FETCH_HEAD  * branch            b7f5d8d735b280fc77673c4a29f0436a92ca6660 -> FETCH_HEAD
 Submodule path 'src/libhamcore': checked out 'b7f5d8d735b280fc77673c4a29f0436a92ca6660' Submodule path 'src/libhamcore': checked out 'b7f5d8d735b280fc77673c4a29f0436a92ca6660'
 +</pre></html></WRAP>
 +</WRAP>
 +
 +===== リモートリポジトリ =====
 +
 +==== ローカルリポジトリのリモート URL を表示/変更 ====
 +クローンしたローカルリポジトリのリモート URL を表示する...🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>cd</b> jupyter-binder
 +<b class=GRN>$</b> <b class=HIY>git</b> remote get-url origin
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +https://github.com/tomoyan596/jupyter-binder.git
 +</pre></html></WRAP>
 +</WRAP>
 +
 +ローカルリポジトリのリモート URL を SSH の URL に変更する😊\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>git</b> remote set-url origin git@github.com:tomoyan596/jupyter-binder.git
 +<b class=GRN>$</b> <b class=HIY>git</b> remote get-url origin
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +git@github.com:tomoyan596/jupyter-binder.git
 +</pre></html></WRAP>
 +</WRAP>
 +
 +ローカルリポジトリのリモート URL を HTTPS の URL に変更する😊\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>git</b> remote set-url origin https://github.com/tomoyan596/jupyter-binder.git
 +<b class=GRN>$</b> <b class=HIY>git</b> remote get-url origin
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +https://github.com/tomoyan596/jupyter-binder.git
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 423: 行 466:
 [[qita>sonots/items/ce08c30d161ea0b4d5fd|git で shallow clone - Qiita]]\\ [[qita>sonots/items/ce08c30d161ea0b4d5fd|git で shallow clone - Qiita]]\\
 [[https://pocke.hatenablog.com/entry/2018/12/19/015644|git: shallow cloneしてすぐunshallowする - pockestrap]]\\ [[https://pocke.hatenablog.com/entry/2018/12/19/015644|git: shallow cloneしてすぐunshallowする - pockestrap]]\\
-[[https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt|Git - git-clone Documentation]]\\+[[gits>docs/git-clone#Documentation/git-clone.txt---depthltdepthgt|Git - git-clone Documentation]]\\ 
 + 
 +[[gitb>jp/2021-01-13-get-up-to-speed-with-partial-clone-and-shallow-clone/|パーシャルクローンとシャロークローンを活用しよう - GitHubブログ]]\\
 [[qita>tsuyoshi_cho/items/8ee621805332249a6fa5|git のクローンを最小量にする(サブモジュールを含めたshallow clone) - Qiita]]\\ [[qita>tsuyoshi_cho/items/8ee621805332249a6fa5|git のクローンを最小量にする(サブモジュールを含めたshallow clone) - Qiita]]\\
 [[zn>snowcait/articles/d44d6b2bed2e4b29ada4|Git で shallow clone するときに全ブランチの最新履歴を取得する]]\\ [[zn>snowcait/articles/d44d6b2bed2e4b29ada4|Git で shallow clone するときに全ブランチの最新履歴を取得する]]\\
 +[[https://サーバー構築と設定.com/?p=1434|Git サーバーを CentOS 7 で構築する方法と設定手順 - サーバー構築と設定 ~初心者にも分かりやすく解説~]]\\
 +[[https://www.nekotricolor.com/entry/theory-of-bare-and-non-bare-repository-manage-wordpress-themes-with-git|ベアリポジトリとノンベアリポジトリ:理論編〜GitでWordpressのテーマを管理 - トリコロールな猫]]\\
 +[[https://www.nekotricolor.com/entry/practice-of-bare-and-non-bare-repository-manage-wordpress-themes-with-git|ベアリポジトリとノンベアリポジトリ:実践編〜GitでWordPressのテーマを管理 - トリコロールな猫]]\\
 +[[https://atmarkit.itmedia.co.jp/ait/articles/1701/24/news141.html|これでもう怖くない、Git/GitHubにおけるリモートリポジトリの作成、確認、変更、更新時の基本5コマンド]]\\
 +[[zn>kazuwombat/articles/eced2915b6adff|git reset —hardしてしまった時に元に戻す方法]]\\
  
 ==== 付録 ==== ==== 付録 ====
-[[tw>tomoyan596/status/1375662745056464897|git の shallow clone についてまとめておこうかなぁ🤔」 Twitter]]\\+[[tw>tomoyan596/status/1375662745056464897|git の shallow clone についてまとめておこうかなぁ🤔]]\\ 
 +[[tw>tomoyan596sp/status/1635375497503985665|Gitのベアリポジトリとノンベアリポジトリについて🤔]]\\
  
  • linux/git.1664470129.txt.gz
  • 最終更新: 2022/09/30 01:48
  • by ともやん