31. Examine the cloned repository

Goals

  • To find out about branches in the remote repositories.

01 Viewing the cloned repository

Let's have a look at our cloned repository.

Run

cd home
ls

Result

$ cd home
$ ls
css
index.html
README

You will see a list of all files in the top level of the original repository (README, index.html and css).

02 View the history of the cloned repository

Run

git log --all

Result

$ git log --all --graph
* 39a1e0f 2023-11-28 | Renamed hello.html; moved style.css (HEAD -> main, origin/style, origin/main, origin/HEAD) [Alexander Shvets]
* 23149b5 2023-11-28 | Included stylesheet into hello.html [Alexander Shvets]
* b9e6de1 2023-11-28 | Added css stylesheet [Alexander Shvets]
* 85c14e9 2023-11-28 | Added meta title [Alexander Shvets]
* ee16740 2023-11-28 | Added README [Alexander Shvets]
* 9288a33 2023-11-28 | Added copyright statement with email [Alexander Shvets]
* b7614c1 2023-11-28 | Added HTML header (tag: v1) [Alexander Shvets]
* 46afaff 2023-11-28 | Added standard HTML page tags (tag: v1-beta) [Alexander Shvets]
* 78433de 2023-11-28 | Added h1 tag [Alexander Shvets]
* 5836970 2023-11-28 | Initial commit [Alexander Shvets]

You will see a list of all the commits in the new repository, and it should match the commit history of the original repository. The only difference should be in the names of the branches.

03 Remote branches

You will see a main branch (HEAD) in the history. You will also find branches with strange names (origin/main, origin/style and origin/HEAD). We'll discuss them a bit later.