Review the Cloned Repository

Goals

  • Learn about branches on remote repositories.

Look at the cloned repository

Let’s take a look at the cloned repository.

Execute:

  1. cd cloned_hello
  2. ls

Output:

  1. $ cd cloned_hello
  2. $ ls
  3. README
  4. Rakefile
  5. lib

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

Review the Repository History

Execute:

  1. git hist --all

Output:

  1. $ git hist --all
  2. * e0cc19e 2020-06-20 | Updated Rakefile (HEAD -> master, origin/master, origin/greet, origin/HEAD) [Jim Weirich]
  3. * 046088a 2020-06-20 | Hello uses Greeter [Jim Weirich]
  4. * 3db0ffe 2020-06-20 | Added greeter class [Jim Weirich]
  5. * 8d90176 2020-06-20 | Added README [Jim Weirich]
  6. * 5aec14d 2020-06-20 | Added a Rakefile. [Jim Weirich]
  7. * 721b979 2020-06-20 | Moved hello.rb to lib [Jim Weirich]
  8. * 907a445 2020-06-20 | Add an author/email comment [Jim Weirich]
  9. * 4254c94 2020-06-20 | Added a comment (tag: v1) [Jim Weirich]
  10. * c8b3af1 2020-06-20 | Added a default value (tag: v1-beta) [Jim Weirich]
  11. * 30c2cd4 2020-06-20 | Using ARGV [Jim Weirich]
  12. * 4445720 2020-06-20 | First Commit [Jim Weirich]

You should now see a list of all the commits in the new repository, and it should (more or less) match the history of commits in the original repository. The only difference should be in the names of the branches.

Remote branches

You should see a master branch (along with HEAD) in the history list. But you will also have a number of strangely named branches (origin/master, origin/greet and origin/HEAD). We’ll talk about them in a bit.