計算機科学のブログ

ほしい物リスト

Git - Looking Around: Investigating Your Git Repository - all, graph

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(27/100)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% git branch 
  different-base
* master
  spicy-version
% git switch spicy-version 
Switched to branch 'spicy-version'
% git log --oneline 
8d670e9 (HEAD -> spicy-version) update recipe name
4cca5a7 make it spicy
5db2b68 (master) first attempt
% git log --oneline --all
8d670e9 (HEAD -> spicy-version) update recipe name
4cca5a7 make it spicy
0065b8a (different-base) cut down salt
549e0da use sour cream
5db2b68 (master) first attempt
% git log --oneline --all --graph 
* 8d670e9 (HEAD -> spicy-version) update recipe name
* 4cca5a7 make it spicy
| * 0065b8a (different-base) cut down salt
| * 549e0da use sour cream
|/  
* 5db2b68 (master) first attempt
%

commit graph

This is the commit identified by 8d670e9.
This is the commit identif…
This is the commit 4cca5a7, and 8d670e9’s parent.
This is the commit 4cca5a7…
This is the commit 0065b8a.
This is the commit 0065b8a.
This is the commit 549e0da, and 0065b8a’s parent.
This is the commit 549e0da,…
This is the spicy-version branch.
This is the spicy-version…
This is the different-base branch.
This is the different-base…
Text is not SVG - cannot display