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) [Marina Pushkova]
* 1436f13 2011-03-09 | Hello uses style.css [Marina Pushkova]
* 59da9a7 2011-03-09 | Added css stylesheet [Marina Pushkova]
* 6c0f848 2011-03-09 | Added README [Marina Pushkova]
* 8029c07 2011-03-09 | Added index.html. [Marina Pushkova]
* 567948a 2011-03-09 | Moved hello.html to lib [Marina Pushkova]
* 6a78635 2011-03-09 | Add an author/email comment [Marina Pushkova]
* fa3c141 2011-03-09 | Added HTML header (v1) [Marina Pushkova]
* 8c32287 2011-03-09 | Added standard HTML page tags (v1-beta) [Marina Pushkova]
* 43628f7 2011-03-09 | Added h1 tag [Marina Pushkova]
* 911e8c9 2011-03-09 | First Commit [Marina Pushkova]

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.

SVN?
© 2011-2014 Git How To. All rights reserved / Contact us