Git 送信履歴の表示
Git を使用していくつかの更新を送信した後、またはプロジェクトのクローンを作成した後、送信履歴を確認したい場合は、git log コマンドを使用して表示できます。
前の章の操作では、次を使用します
git log コマンドは、次のように履歴コミット レコードをリストします:
$ git log commit 88afe0e02adcdfea6844bb627de97da21eb10af1 Merge: 14b4dca d7e7346 Author: w3cschool <w3c@w3cschool.cc> Date: Sun Mar 1 15:03:42 2015 +0800 Merge branch 'change_site' Conflicts: test.txt commit 14b4dcadbdc847207651d5a9fae0d315057f346e Author: w3cschool <w3c@w3cschool.cc> Date: Sun Mar 1 14:53:15 2015 +0800 新增加一行 commit d7e734640da06055e107eaf29cf350b3f1de1c2c Author: w3cschool <w3c@w3cschool.cc> Date: Sun Mar 1 14:48:57 2015 +0800 changed the site commit 556f0a0637978097b82287ac665a717623b21f3f Author: w3cschool <w3c@w3cschool.cc> Date: Sun Mar 1 14:40:34 2015 +0800 removed test2.txt
--oneline オプションを使用すると、履歴の簡潔なバージョンを表示できます。
$ git log --oneline 88afe0e Merge branch 'change_site' 14b4dca 新增加一行 d7e7346 changed the site 556f0a0 removed test2.txt 2e082b7 add test2.txt 048598f add test.txt 85fc7e7 test comment from w3cschool.cc
これが私たちに伝えるのは、このプロジェクトの開発の歴史です。
--graph オプションを使用して、履歴内で分岐とマージがいつ発生したかを確認することもできます。以下は、トポロジ マップ オプションを有効にした同じコマンドです:
$ git log --oneline --graph * 88afe0e Merge branch 'change_site' |\ | * d7e7346 changed the site * | 14b4dca 新增加一行 |/ * 556f0a0 removed test2.txt * 2e082b7 add test2.txt * 048598f add test.txt * 85fc7e7 test comment from w3cschool.cc
これで、作業がいつフォークされ、いつマージされるのかをより明確に確認できるようになりました。
「--reverse」パラメータを使用して、すべてのログを逆方向に表示することもできます。
$ git log --reverse --oneline 85fc7e7 test comment from w3cschool.cc 048598f add test.txt 2e082b7 add test2.txt 556f0a0 removed test2.txt d7e7346 changed the site 14b4dca 新增加一行 88afe0e Merge branch 'change_site'
指定したユーザーの送信ログのみを検索したい場合は、コマンド git log --author を使用できます。たとえば、Git ソース コードで Linus を検索したいとします。
投稿部分:
$ git log --author=Linus --oneline -5 81b50f3 Move 'builtin-*' into a 'builtin/' subdirectory 3bb7256 make "index-pack" a built-in 377d027 make "git pack-redundant" a built-in b532581 make "git unpack-file" a built-in 112dd51 make "mktag" a built-in
日付を指定したい場合は、--since と --before といういくつかのオプションがありますが、--until と --after を使用することもできます。
たとえば、Git プロジェクトの 3 週間前および 4 月 18 日以降のすべてのコミットを表示したい場合は、これを実行できます (--no-merges も使用します)
マージコミットを非表示にするオプション):
$ git log --oneline --before={3.weeks.ago} --after={2010-04-18} --no-merges 5469e2d Git 1.7.1-rc2 d43427d Documentation/remote-helpers: Fix typos and improve language 272a36b Fixup: Second argument may be any arbitrary string b6c8d2d Documentation/remote-helpers: Add invocation section 5ce4f4e Documentation/urls: Rewrite to accomodate transport::address 00b84e9 Documentation/remote-helpers: Rewrite description 03aa87e Documentation: Describe other situations where -z affects git diff 77bc694 rebase-interactive: silence warning when no commits rewritten 636db2c t3301: add tests to use --format="%N"
上記は、送信履歴の表示に関する Git チュートリアルの詳細な説明です。その他の関連記事については、PHP 中国語 Web サイト (www.php.cn) に注目してください。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

ZendStudio 13.5.1 Mac
強力な PHP 統合開発環境

AtomエディタMac版ダウンロード
最も人気のあるオープンソースエディター

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

SublimeText3 Linux 新バージョン
SublimeText3 Linux 最新バージョン

SublimeText3 中国語版
中国語版、とても使いやすい
