git

git

[27] Gitバージョン管理システムです。

[28] CVSSubversion などを置き換えバージョン管理システム事実上の標準となっています。 普及開始期には似たコンセプトと操作性の Mercurial と市場を二分していましたが、 GitHub の成功もあって Git への移行が進みました。

リダイレクト

[16] HTTPリダイレクトを使って、旧リポジトリーディレクトリー以下すべての pathquery を保存して新リポジトリーURL を示せば、 git クライアントに新リポジトリーを参照させることができます。

git: URL scheme

[19] git: URL schemeGit 独自のプロトコルを表します。

[18] git-clone(1) ( ( 版)) https://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS

[51] GitHub はこのプロトコルへの対応をやめてしまいました。 セキュリティーのためとはいえ非互換変更は困ったものです。

[54] cpanm - get, unpack build and install modules from CPAN - metacpan.org, https://metacpan.org/dist/App-cpanminus/view/bin/cpanm#arguments

cpanm git://github.com/plack/Plack.git@1.0000        # tag
cpanm git://github.com/plack/Plack.git@devel         # branch

[55] >>54 これは本家 git にない独自仕様。

git commit するべきものがないエラー

[29] なにも変更なく git commit すると、

no changes added to commit

... とエラーメッセージが出て、 exit code1 で失敗して終了します。

[30] --allow-empty オプションをつけて実行すればエラーになるのは防げますが、 空のコミットは作られてしまいます。

[32] 変更がなくてもエラーにならず、 空のコミットを作らせもせず、 しかしそれ以外のエラーがあれば通常通り報告させたいときは、

git diff-index --quiet HEAD --cached || git commit

... とすれば良いようであります >>31

ファイルサイズ制限

[33] git としては問題なくても、ホスティングサービスでエラーになるファイルサイズ制限があります。

[35] GitHub ではファイルのサイズが 50MB で警告、 100MB で push 拒否されます。 >>34

[36] GitHubWebブラウザーインターフェイスでは 25MB 超のファイルをアップロードできません。 >>34

[44] BitBucket の文書にはファイルサイズの制限が見当たりません。制限はないのかも知れません。

[50] BitBucket は数百MBでもOK。

[37] GitHubリポジトリーのサイズが 1GB 未満を推奨、 5GB 未満を強く推奨しています。 また GitHub の動作に支障があるレベルだと連絡が来るそうです (が具体的な条件は書かれていません)。 >>34

[46] GitHub は以前は 75GB が警告、 100GB が上限と書かれていたそうです。 その後 5GB 超で削除要求メールが来たという報告があります。 >>45

[40] BitBucket はリポジトリーが 1GB で警告メールが来て、 2GB で push できなくなります。 >>39 Git 限定とは書いていないので Mercurial (サービス終了済み) も同じでしょうか。

[43] >>40 より新しいドキュメントには、実際にはそれより上限が緩い旨が書かれています。 >>41, >>42

[48] GitLab.com ではリポジトリーサイズの最大が 10GB です。 >>47

[49] ただし GitLab.com は令和4年10月から namespace ごとのストレージ上限が適用されます。 おそらくリポジトリーはこのストレージサイズの枠内に入っているので、 Free プランだと5GBが最大になります。

ホスティングサービス

GitHub, GitLab

メモ

[1] InterfacesFrontendsAndTools - GitWiki ( 版) http://git.or.cz/gitwiki/InterfacesFrontendsAndTools

[2] Git - Fast Version Control System ( 版) http://git-scm.com/

[3] git(1) ( 版) http://www8.atwiki.jp/git_jp/pub/git-manual-jp/Documentation/git.html

[4] CVS リポジトリを Git へ移行する | ITEMAN Blog - アイテマンブログ ( 版) http://iteman.jp/blog/2009/05/cvs-git.html

[5] cvs2svn: cvs2git Documentation ( 版) http://cvs2svn.tigris.org/cvs2git.html

[6] git-cvsimport(1) ( ( 版)) http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html

[7] hatena/Git-for-Designers - GitHub ( ( 版)) https://github.com/hatena/Git-for-Designers

[8] submodule のリスト

$ git config -f .gitmodules --get-regexp "^submodule\.[^.]+\.path$"| sed 's/^submodule\.\(\S\+\)\.path.*/\1/'|xargs -l1 -i% -- sh -c 'echo git submodule add `git config -f .gitmodules --get "submodule.%.url"` `git config -f .gitmodules --get "submodule.%.path"`'

[9] Git on WebApp with Perl // Speaker Deck ( ( 版)) https://speakerdeck.com/u/hakobe/p/git-on-webapp-with-perl

[10] Git on WebApp with perl - Kyoto.pm Tech Talks #01 - YouTube ( ( 版)) http://www.youtube.com/watch?v=mZ93iLTHrlg

[11] Git::Repository - search.cpan.org ( ( 版)) http://search.cpan.org/dist/Git-Repository/lib/Git/Repository.pm

[12] Guita/lib/Guita/Mapper/Git.pm at master · hakobe/Guita · GitHub ( ( 版)) https://github.com/hakobe/Guita/blob/master/lib/Guita/Mapper/Git.pm

[13] git-submodule-track ( ( 版)) https://gist.github.com/motemen/667573

[14] Git の特定リビジョンのツリーをファイルシステムのように扱う Go の実装 - 詩と創作・思索のひろば ( 版) http://motemen.hatenablog.com/entry/2014/12/16/go-vcs-fs

[15] libgit2 ( 版) https://libgit2.github.com/

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library with a solid API, allowing you to write native speed custom Git applications in any language which supports C bindings.

[20]

$ git config --global color.ui auto

[21] SPDX Specification 2.1 (web version) | Software Package Data Exchange (SPDX) ( ()) https://spdx.org/spdx-specification-21-web-version#h.49x2ik5

SPDX supports git, git+git, git+https git+http and git+ssh transports. git and git+git are equivalent.

 

[22] install | npm Documentation () https://docs.npmjs.com/cli/install

Installs the package from the hosted git provider, cloning it with git. For a full git remote url, only that URL will be attempted.

<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]

<protocol> is one of git, git+ssh, git+http, git+https, or git+file.

If #<commit-ish> is provided, it will be used to clone exactly that commit. If the commit-ish has the format #semver:<semver>, <semver> can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither #<commit-ish> or #semver:<semver> is specified, then master is used.

[23] install | npm Documentation () https://docs.npmjs.com/cli/install

npm install git+ssh://git@github.com:npm/npm.git#v1.0.27

npm install git+ssh://git@github.com:npm/npm#semver:^5.0

npm install git+https://isaacs@github.com/npm/npm.git

npm install git://github.com/npm/npm.git#v1.0.27

[24] TipsAndTricks/NPM - Yocto Project () https://wiki.yoctoproject.org/wiki/TipsAndTricks/NPM

SRC_URI = "git://github.com/martinaglv/cute-files.git;protocol=https \

[25] BitBake User Manual () http://www.yoctoproject.org/docs/2.4/bitbake-user-manual/bitbake-user-manual.html#git-fetcher

Here are some example URLs:

SRC_URI = "git://git.oe.handhelds.org/git/vip.git;tag=version-1"

SRC_URI = "git://git.oe.handhelds.org/git/vip.git;protocol=http"

[26] BitBake User Manual () http://www.yoctoproject.org/docs/2.4/bitbake-user-manual/bitbake-user-manual.html#gitsm-fetcher

4.3.6. Git Submodule Fetcher (gitsm://)¶

This fetcher submodule inherits from the Git fetcher and extends that fetcher's behavior by fetching a repository's submodules. SRC_URI is passed to the Git fetcher as described in the "Git Fetcher (git://)" section.

Notes and Warnings

You must clean a recipe when switching between 'git://' and 'gitsm://' URLs.

The Git Submodules fetcher is not a complete fetcher implementation. The fetcher has known issues where it does not use the normal source mirroring infrastructure properly.

[52] GIT_SSL_NO_VERIFY

[53] git security fixes lead to "fatal: transport 'file' not allowed" error in CI systems; CVE-2022-39253 - Logbook () https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html

git config --global protocol.file.allow always