Tsallaka zuwa abun ciki
Justice Tech School

Graph View

--graph draws the branch shape and --all includes every branch.

Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git switch -q -c feat
echo f > f.txt && git add f.txt && git commit -qm 'feat'
git switch -q main
echo m > m.txt && git add m.txt && git commit -qm 'main'
git merge -q --no-edit feat
git log --graph --format=%s | sed 's/ *$//'

Result

*   Merge branch 'feat'
|\
| * feat
* | main
|/
* first

Exercise

Draw branches.

git log 

Quiz Test

What does * mean in the graph?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.