計算機科学のブログ

ほしい物リスト

Git - Looking Around: Investigating Your Git Repository - diff command, cached flag

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)、SHARPEN YOUR PENCIL(255/715)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% git branch
  different-base
  master
* spicy-version
% git status
On branch spicy-version
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   saucy.md

no changes added to commit (use "git add" and/or "git commit -a")
% git add saucy.md 
% git diff
% git diff --cached 
diff --git a/saucy.md b/saucy.md
index 20b7e5a..2c7dfd8 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 pinches - Salt
+2 - Jalapenos, deseeded
 
 ## Instructions
-Add all ingredients to a blender. Mix until smooth.
+Add all ingredients to a blender. Mix until hdesired consistency.
%