計算機科学のブログ

ほしい物リスト

Git - Looking Around: Investigating Your Git Repository - diff

Head First Git: A Learner’s Guide to Understanding Git from the Inside OutRaju Gandhi(著)、 O’Reilly Mediaの Chapter 3.(Looking Around: Investigating Your Git Repository)、EXERCISE(45/100)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% git branch 
  different-base
* master
  spicy-version
% git switch spicy-version 
Switched to branch 'spicy-version'
% code .
% git diff
diff --git a/saucy.md b/saucy.md
index 20b7e5a..757c758 100644
--- a/saucy.md
+++ b/saucy.md
@@ -6,8 +6,8 @@
 2 cups - Chopped cilantro
 1/4 cup - Olive oil
 1/4 cup - Lime juice
-1 pinch - Salt
-1 - Jalapeno, deseeded
+2 pinch - Salt
+2 - Jalapeno, deseeded
 
 ## Instructions
-Add all ingredients to a blender. Mix until smooth.
+Add all ingredients to a blender. Mix until desired consistency.
% git diff --word-diff
diff --git a/saucy.md b/saucy.md
index 20b7e5a..757c758 100644
--- a/saucy.md
+++ b/saucy.md
@@ -6,8 +6,8 @@
2 cups - Chopped cilantro
1/4 cup - Olive oil
1/4 cup - Lime juice
[-1-]{+2+} pinch - Salt
[-1-]{+2+} - Jalapeno, deseeded

## Instructions
Add all ingredients to a blender. Mix until [-smooth.-]{+desired consistency.+}
%