38. 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 cloned_hello
ls

Result:

$ cd cloned_hello
$ ls
README
index.html
lib

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

02 View the history of the repository

Run:

git hist --all

Result:

$ git hist --all
* 6e6c76a 2011-03-09 | Updated index.html (HEAD, origin/master, origin/style, origin/HEAD, master) [Alexander Shvets]
* 1436f13 2011-03-09 | Hello uses style.css [Alexander Shvets]
* 59da9a7 2011-03-09 | Added css stylesheet [Alexander Shvets]
* 6c0f848 2011-03-09 | Added README [Alexander Shvets]
* 8029c07 2011-03-09 | Added index.html. [Alexander Shvets]
* 567948a 2011-03-09 | Moved hello.html to lib [Alexander Shvets]
* 6a78635 2011-03-09 | Add an author/email comment [Alexander Shvets]
* fa3c141 2011-03-09 | Added HTML header (v1) [Alexander Shvets]
* 8c32287 2011-03-09 | Added standard HTML page tags (v1-beta) [Alexander Shvets]
* 43628f7 2011-03-09 | Added h1 tag [Alexander Shvets]
* 911e8c9 2011-03-09 | First 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 master branch (HEAD) in the history. You will also find branches with strange names (origin/master, origin/style and origin/HEAD). We’ll discuss them a bit later.