Git-2.43.0
Git の概要
Git is a free and open source,
distributed version control system designed to handle everything
from small to very large projects with speed and efficiency. Every
Git clone is a full-fledged
repository with complete history and full revision tracking
capabilities, not dependent on network access or a central server.
Branching and merging are fast and easy to do. Git is used for version control of files, much
like tools such as Mercurial-6.6.1, Bazaar, Subversion-1.14.2, CVS, Perforce, and Team
Foundation Server.
注記
LFS や依存パッケージが本ブックに示す最新安定バージョンでなかった場合には、BLFS
開発版においては、パッケージのビルドや処理実行が適切に行われないことがあります。
パッケージ情報
追加のダウンロード
Git の依存パッケージ
推奨
cURL-8.5.0 (http, https, ftp, ftps 経由で
Git を用いる場合に必要)
任意
Apache-2.4.58 (for some tests), GnuPG-2.4.3
(runtime, may be used to sign Git
commits or tags, or verify the signatures of them), OpenSSH-9.5p1 (runtime, needed to use
Git over ssh), pcre2-10.42 (or the deprecated PCRE-8.45), in either case
configured with --enable-jit
,
Subversion-1.14.2 with Perl bindings
(runtime, for git
svn), Tk-8.6.13 (gitk, a simple Git repository viewer, uses Tk at runtime), Valgrind-3.22.0,
Authen::SASL and
MIME::Base64 (both
runtime, for git
send-email), and IO-Socket-SSL-2.084 (runtime, for
git send-email to
connect to a SMTP server with SSL encryption)
任意 (man ページと html ドキュメントなどを生成する場合)
xmlto-0.0.28 and asciidoc-10.2.0 , and also dblatex (for the PDF
version of the user manual), and docbook2x to create info
pages
Git のインストール
以下のコマンドを実行して Git をビルドします。
./configure --prefix=/usr \
--with-gitconfig=/etc/gitconfig \
--with-python=python3 &&
make
You can build the man pages and/or html docs, or use downloaded
ones. If you choose to build them, use the next two instructions.
asciidoc-10.2.0 をインストールしていて
htmlなどのドキュメントを生成したい場合は以下を実行します。
make html
asciidoc-10.2.0 と xmlto-0.0.28
をインストールしている場合、以下のコマンドを実行すれば man ページを生成することができます。
make man
テストスイートは並行モードでの実行も可能です。 ビルド結果をテストする場合は make test を実行します。
root
ユーザーになって以下を実行します。
make perllibdir=/usr/lib/perl5/5.38/site_perl install
If you created the man pages and/or html docs
root
ユーザーになって以下のコマンドを実行し man
ページをインストールします。
make install-man
root
ユーザーになって以下のコマンドを実行し html
ドキュメントをインストールします。
make htmldir=/usr/share/doc/git-2.43.0 install-html
If you downloaded the man pages and/or html docs
man ページをダウンロードしている場合は、root
ユーザーになって以下のように伸張 (解凍) します。
tar -xf ../git-manpages-2.43.0.tar.xz \
-C /usr/share/man --no-same-owner --no-overwrite-dir
html ドキュメントをダウンロードしている場合は、root
ユーザーになって以下のように伸張 (解凍) します。
mkdir -vp /usr/share/doc/git-2.43.0 &&
tar -xf ../git-htmldocs-2.43.0.tar.xz \
-C /usr/share/doc/git-2.43.0 --no-same-owner --no-overwrite-dir &&
find /usr/share/doc/git-2.43.0 -type d -exec chmod 755 {} \; &&
find /usr/share/doc/git-2.43.0 -type f -exec chmod 644 {} \;
Reorganize text and html in the html-docs (both methods)
For both methods, the html-docs include a lot of plain text files.
Reorganize the files as the root
user:
mkdir -vp /usr/share/doc/git-2.43.0/man-pages/{html,text} &&
mv /usr/share/doc/git-2.43.0/{git*.txt,man-pages/text} &&
mv /usr/share/doc/git-2.43.0/{git*.,index.,man-pages/}html &&
mkdir -vp /usr/share/doc/git-2.43.0/technical/{html,text} &&
mv /usr/share/doc/git-2.43.0/technical/{*.txt,text} &&
mv /usr/share/doc/git-2.43.0/technical/{*.,}html &&
mkdir -vp /usr/share/doc/git-2.43.0/howto/{html,text} &&
mv /usr/share/doc/git-2.43.0/howto/{*.txt,text} &&
mv /usr/share/doc/git-2.43.0/howto/{*.,}html &&
sed -i '/^<a href=/s|howto/|&html/|' /usr/share/doc/git-2.43.0/howto-index.html &&
sed -i '/^\* link:/s|howto/|&html/|' /usr/share/doc/git-2.43.0/howto-index.txt
コマンド説明
--with-gitconfig=/etc/gitconfig
: This
sets /etc/gitconfig
as the file that
stores the default, system wide, Git settings.
--with-python=python3
: Use
this switch to use Python 3,
instead of the EOL'ed Python 2.
Python is used for the git
p4 interface to Perforce repositories, and also
used in some tests.
--with-libpcre2
: Use this switch if
PCRE2 is installed and has been
built with the non-default JIT enabled.
--with-libpcre1
: As an alternative to
PCRE2, use this switch if the deprecated PCRE is installed and has been built with the
non-default JIT enabled.
tar -xf ../git-manpages-2.43.0.tar.gz
-C /usr/share/man --no-same-owner: This untars
git-manpages-2.43.0.tar.gz
. The
-C
option makes tar change directory to
/usr/share/man
before it starts to
decompress the docs. The --no-same-owner
option stops tar from preserving
the user and group details of the files. This is useful as that
user or group may not exist on your system; this could
(potentially) be a security risk.
mv /usr/share/doc/git-2.43.0
...: These commands move some of the files into
subfolders to make it easier to sort through the docs and find what
you're looking for.
find ... chmod ...:
These commands correct the permissions in the shipped documentation
tar file.
Git の設定
設定ファイル
~/.gitconfig
, /etc/gitconfig
パッケージ構成
インストールプログラム: git, git-receive-pack, git-upload-archive,
git-upload-pack (hardlinked to each other), git-cvsserver,
git-shell, gitk, scalar
インストールライブラリ: なし
インストールディレクトリ: /usr/libexec/git-core,
/usr/lib/perl5/5.38/site_perl/Git,
/usr/share/{doc/git-2.43.0,git-core,git-gui,gitk,gitweb}
概略説明
git
|
is the stupid content tracker
|
git-cvsserver
|
is a CVS server emulator for Git
|
gitk
|
Git リポジトリブラウザー
(Tk-8.6.13 が必要)
|
git-receive-pack
|
is invoked by git
send-pack and updates the repository with
the information fed from the remote end
|
git-shell
|
is a login shell for SSH accounts to provide restricted
Git access
|
git-upload-archive
|
is invoked by git archive
--remote and sends a generated archive to
the other end over the git protocol
|
git-upload-pack
|
is invoked by git
fetch-pack, it discovers what objects the
other side is missing, and sends them after packing
|
scalar
|
is a repository management tool that optimizes Git for
use in large repositories
|