Monday, February 23, 2009

Chapter 20: Git and GitHub Course: Day 3

Summary of Day 3 Work Flow (pg.38-58):
  1. If you want a copy of a repo, then use "git clone".
  2. CLONE DOWN: git clone git://github.com/IndianGuru/advgame.git (p.40)
  3. Initialized empty Git repository in c:/Users/jasnow/gitlocalrepo/advgame/.git/
    remote: Counting objects: 12, done.←[K
    remote: Compressing objects: 100% (12/12), done.←[K
    remote: Total 12 (delta 2), reused 0 (delta 0)←[K
    Receiving objects: 100% (12/12), 10.37 KiB, done.
    Resolving deltas: 100% (2/2), done.
  4. cd advgame ; git log (p.40-41)
  5. GITK : cd ../mygittest ; gitk --all (p.41-42)
  6. Log into GitHub. (p.43)
  7. Fork another person's repository so you can have my own copy on GitHub. (p.43) -- Done
  8. cd .. ; git clone git@github.com:jasnow/ruby_learning_participants.git (p.44)
  9. Initialized empty Git repository in c:/Users/jasnow/gitlocalrepo/ruby_learning_p
    articipants/.git/
    remote: Counting objects: 73, done.←[K
    remote: Compressing objects: 100% (73/73), done.←[K
    remote: Total 73 (delta 34), reused 0 (delta 0)←[KKiB/s
    Receiving objects: 100% (73/73), 409.90 KiB | 236 KiB/s, done.
    Resolving deltas: 100% (34/34), done.
  10. cd ruby_learning_participants ; git remote show origin (p.44)
  11. * remote origin
    URL: git@github.com:jasnow/ruby_learning_participants.git
    Remote branch merged with 'git pull' while on branch master
    master
    Tracked remote branch
    master
  12. Edited the file using non-GNU emacs using Cygwin in separate window.
  13. $ git add README.txt (p.45)
    warning: LF will be replaced by CRLF in README.txt
  14. $ git commit -m 'added my name in README.txt' (p.45)
    [master]: created warning: LF will be replaced by CRLF in README.txt
    3e466e1: "added my name in README.txt"
    1 files changed, 1 insertions(+), 0 deletions(-)
  15. PUSH UP: $ git push origin master (p.45)
    Counting objects: 5, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 372 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To git@github.com:jasnow/ruby_learning_participants.git
    ab8044d..3e466e1 master -> master
  16. Note the last 3 steps are "A/C/P".
  17. Do "Pull Request" on GitHub. (p.45-47)
  18. cd ruby_learning_participants ; git remote add ashbbrlp (p.48) git@github.com:jasnow/ruby_learning_participants.git
  19. Suggest that you rename this remote to "a_snapshot" (more descriptive).
  20. $ git remote show ashbbrlp
    * remote ashbbrlp
    URL: git@github.com:jasnow/ruby_learning_participants.git
    New remote branch (next fetch will store in remotes/ashbbrlp)
    master
  21. FETCH DOWN: $ git fetch ashbbrlp (p.48)
    From git@github.com:jasnow/ruby_learning_participants
    * [new branch] master -> ashbbrlp/master
  22. PULL DOWN: $ git pull ashbbrlp master (p.49)
    From git@github.com:jasnow/ruby_learning_participants
    * branch master -> FETCH_HEAD
    Already up-to-date.
  23. Exercise 3: A/C/P (p.49-51)
  24. $ git add fork.rb (p.50)
    warning: LF will be replaced by CRLF in fork.rb
  25. $ git commit -m 'adding fork.rb file' (p.50)
    [master]: created 22b8b69: "adding fork.rb file"
    warning: LF will be replaced by CRLF in fork.rb
    1 files changed, 1 insertions(+), 0 deletions(-)
    create mode 100644 fork.rb
  26. PUSH UP: $ git push origin master (p.50)
    Counting objects: 4, done.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 284 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To git@github.com:jasnow/mygittest.git
    2eca6e8..22b8b69 master -> master
  27. Suggest moving last two lines on page 50 dealing with what is inside fork.rb to page 49 (before the other instructions).
  28. MERGING:
  29. Now for RLGGHC's gittest repo. (p.51)
  30. $ cd .. ; git clone git@github.com:jasnow/gittest.git
    Initialized empty Git repository in c:/Users/jasnow/gitlocalrepo/gittest/.git/
    remote: Counting objects: 19, done.←[K
    remote: Compressing objects: 100% (15/15), done.←[K
    remote: Total 19 (delta 5), reused 0 (delta 0)←[K
    Receiving objects: 100% (19/19), done.
    Resolving deltas: 100% (5/5), done.
  31. Edited fork.rb. (p.51)
  32. git add fork.rb (p.51)
  33. $ git commit -m 'Added my name line to fork.rb' (p.51)
    [master]: created a9c310c: "Added my name line to fork.rb"
    1 files changed, 1 insertions(+), 0 deletions(-)
  34. $ git push origin master (p.51)
    Counting objects: 5, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 312 bytes, done.
    Total 3 (delta 2), reused 0 (delta 0)
    To git@github.com:jasnow/gittest.git
    15dcc6f..a9c310c master -> master
  35. Used "pull request" on GitHub web site to inform project owner of change.
  36. CONFUSED so stopped and read/scanned to page 58 and then from page 1 to 58. Draw a diagram of different git commands. Found better one on internet.
  37. Okay, I'm back on page 52. I got a real "pull request" from jastix so I'm going to use it.
  38. Did page 52 steps and then clicked on "new line" as in page 53.
  39. $ git remote add jastix git://github.com/jastix/mygittest.git
    fatal: remote jastix already exists.
  40. Assumed step 39 is okay (did it a couple of hours ago) so continued.
  41. $ git remote show jastix
    ERROR: Permission to jastix/mygittest denied to jasnow.
    fatal: The remote end hung up unexpectedly
  42. Unclear what I did wrong in step 41.
  43. $ git fetch jastix
    ERROR: Permission to jastix/mygittest denied to jasnow.
    fatal: The remote end hung up unexpectedly
  44. Tried "git log" too and still got problems so I'm stopping here.
  45. Try Exercise 4 so I forked porky's porkygittest repository.
  46. $ git clone git@github.com:jasnow/porkygittest.git
    Initialized empty Git repository in c:/Users/jasnow/porkygittest/.git/
    remote: Counting objects: 4, done.←[K
    remote: Compressing objects: 100% (2/2), done.←[K
    remote: Total 4 (delta 0), reused 0 (delta 0)←[K
    Receiving objects: 100% (4/4), 268 bytes, done.
  47. Moved the directory under gitlocalrepo.
  48. $ git remote show origin
    * remote origin
    URL: git@github.com:jasnow/porkygittest.git
    Remote branch merged with 'git pull' while on branch master
    master
    Tracked remote branch
    master
  49. Added a line to porkgittest's README file.
  50. Then "git add README"
  51. $ git commit -m 'Added my name line to README'
    [master]: created warning: LF will be replaced by CRLF in README
    7399885: "Added my name line to README"
    1 files changed, 1 insertions(+), 0 deletions(-)
  52. $ git push origin master
    Counting objects: 5, done.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 307 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    To git@github.com:jasnow/porkygittest.git
    f94d166..7399885 master -> master
  53. Sent Porky a "Pull Request" from the GitHub web site.
  54. EX#4: Fork/Clone/Edit/Add/Commit/Push/Request Pull
  55. Repeated steps 45-54 with RLGGHC's gittest repository.
  56. Sent RLGGHC and ashbb a Pull Request.
  57. Got a Pull Request from Porky, so I tried: $ git remote add porky git://github.com/porky/gittest.git and got not response.
  58. So I did: $ git remote show porky
    fatal: protocol error: expected sha/ref, got '
    *********'
    No matching repositories found.
    *********'
  59. So I ran "git remote rm jastix" and "git remote rm kevintyll". Then "git remote show" and it shows only "origin".
  60. Stopping this post and move to the next one.





No comments:

Post a Comment