Loading...

Git Tutorial

Examine the cloned repository in git

Lets find out about branches in the remote repositories.

Step1: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 (READMEindex.html and lib).


Step2:View the history of the cloned repository

RUN:

git hist --all

RESULT:

$ git hist --all
* 6e6c76a 2020-01-09 | Updated index.html (HEAD, origin/master, origin/style, origin/HEAD, master) [kwikl3arn]
* 1436f13 2020-01-09 | Hello uses style.css [kwikl3arn]
* 59da9a7 2020-01-09 | Added css stylesheet [kwikl3arn]
* 6c0f848 2020-01-09 | Added README [kwikl3arn]
* 8029c07 2020-01-09 | Added index.html. [kwikl3arn]
* 567948a 2020-01-09 | Moved hello.html to lib [kwikl3arn]
* 6a78635 2020-01-09 | Add an author/email comment [kwikl3arn]
* fa3c141 2020-01-09 | Added HTML header (v1) [kwikl3arn]
* 8c32287 2020-01-09 | Added standard HTML page tags (v1-beta) [kwikl3arn]
* 43628f7 2020-01-09 | Added h1 tag [kwikl3arn]
* 911e8c9 2020-01-09 | First Commit [kwikl3arn]

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.


Step3:Remote branches

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