計算機科学のブログ

ほしい物リスト

Git - GitHub - Searching Git Repositories - Git a Grep - subcommand, log, grep, patch

Head First Git: A Learner’s Guide to Understanding Git from the Inside OutRaju Gandhi(著)、 O’Reilly Mediaの Chapter 7.(Searching Git Repositories: Git a Grep)、SHARPEN YOUR PENCIL(560/680)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% git log --grep 'add first draft of appetizer and drink menus'
commit 99fd56e6628bb154a64b8171f8f3af2be2f96c6e
Author: Trinity <trinity@eventplannerz.com>
Date:   Mon Jul 5 14:01:36 2021 -0400

    add first draft of appetizer and drink menus
% git log 99fd56e6628bb154a64b8171f8f3af2be2f96c6e
commit 99fd56e6628bb154a64b8171f8f3af2be2f96c6e
Author: Trinity <trinity@eventplannerz.com>
Date:   Mon Jul 5 14:01:36 2021 -0400

    add first draft of appetizer and drink menus

commit 6b11ec8cc2b98e799c5a5bd1c480ce214b6e564b
Author: Trinity <trinity@eventplannerz.com>
Date:   Sat Jul 3 05:12:39 2021 -0400

    add README
% git log -p 99fd56e6628bb154a64b8171f8f3af2be2f96c6e
commit 99fd56e6628bb154a64b8171f8f3af2be2f96c6e
Author: Trinity <trinity@eventplannerz.com>
Date:   Mon Jul 5 14:01:36 2021 -0400

    add first draft of appetizer and drink menus

diff --git a/appetizers.md b/appetizers.md
new file mode 100644
index 0000000..ceeaf08
--- /dev/null
+++ b/appetizers.md
@@ -0,0 +1,5 @@
+# Gitanjali and Aref Reception: Appetizers
+
+* Herb-sprinkled stuffed mushrooms
+* Blinis with salmon, caviar, and crème fraiche
+* Mini roast-beef sandwiches
diff --git a/drinks.md b/drinks.md
new file mode 100644
index 0000000..0fcee53
--- /dev/null
+++ b/drinks.md
@@ -0,0 +1,8 @@
+# Gitanjali and Aref Reception: Signature Drinks
+
+* The Manhattan Merge: 
+  Two become one in this updated take on a classic bourbon-vermouth cocktail
+* The Git Gimlet: 
+  Gitanjali’s favorite drink, with refreshing lime and juniper notes 
+* The Git Log Cabin: 
+  Apple brandy and maple syrup will take you on an autumn trip through our favorite couple’s history 

commit 6b11ec8cc2b98e799c5a5bd1c480ce214b6e564b
Author: Trinity <trinity@eventplannerz.com>
Date:   Sat Jul 3 05:12:39 2021 -0400

    add README

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1ad31f5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Gitanjali/Aref wedding plans
+
+This repository will help us manage Gitanjali and Aref's wedding night menus. 
% git log --oneline --grep 'add first draft of appetizer and drink menus'
99fd56e add first draft of appetizer and drink menus
% git log --oneline -p --grep 'add first draft of appetizer and drink menus'
99fd56e add first draft of appetizer and drink menus
diff --git a/appetizers.md b/appetizers.md
new file mode 100644
index 0000000..ceeaf08
--- /dev/null
+++ b/appetizers.md
@@ -0,0 +1,5 @@
+# Gitanjali and Aref Reception: Appetizers
+
+* Herb-sprinkled stuffed mushrooms
+* Blinis with salmon, caviar, and crème fraiche
+* Mini roast-beef sandwiches
diff --git a/drinks.md b/drinks.md
new file mode 100644
index 0000000..0fcee53
--- /dev/null
+++ b/drinks.md
@@ -0,0 +1,8 @@
+# Gitanjali and Aref Reception: Signature Drinks
+
+* The Manhattan Merge: 
+  Two become one in this updated take on a classic bourbon-vermouth cocktail
+* The Git Gimlet: 
+  Gitanjali’s favorite drink, with refreshing lime and juniper notes 
+* The Git Log Cabin: 
+  Apple brandy and maple syrup will take you on an autumn trip through our favorite couple’s history 
%