- If you want a copy of a repo, then use "git clone".
- CLONE DOWN: git clone git://github.com/IndianGuru/advgame.git (p.40)
- 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. - cd advgame ; git log (p.40-41)
- GITK : cd ../mygittest ; gitk --all (p.41-42)
- Log into GitHub. (p.43)
- Fork another person's repository so you can have my own copy on GitHub. (p.43) -- Done
- cd .. ; git clone git@github.com:jasnow/ruby_learning_participants.git (p.44)
- 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. - cd ruby_learning_participants ; git remote show origin (p.44)
- * 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 - Edited the file using non-GNU emacs using Cygwin in separate window.
- $ git add README.txt (p.45)
warning: LF will be replaced by CRLF in README.txt - $ 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(-) - 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 - Note the last 3 steps are "A/C/P".
- Do "Pull Request" on GitHub. (p.45-47)
- cd ruby_learning_participants ; git remote add ashbbrlp (p.48) git@github.com:jasnow/ruby_learning_participants.git
- Suggest that you rename this remote to "a_snapshot" (more descriptive).
- $ 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 - FETCH DOWN: $ git fetch ashbbrlp (p.48)
From git@github.com:jasnow/ruby_learning_participants
* [new branch] master -> ashbbrlp/master - PULL DOWN: $ git pull ashbbrlp master (p.49)
From git@github.com:jasnow/ruby_learning_participants
* branch master -> FETCH_HEAD
Already up-to-date. - Exercise 3: A/C/P (p.49-51)
- $ git add fork.rb (p.50)
warning: LF will be replaced by CRLF in fork.rb - $ 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 - 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 - Suggest moving last two lines on page 50 dealing with what is inside fork.rb to page 49 (before the other instructions).
- MERGING:
- Now for RLGGHC's gittest repo. (p.51)
- $ 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. - Edited fork.rb. (p.51)
- git add fork.rb (p.51)
- $ 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(-) - $ 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 - Used "pull request" on GitHub web site to inform project owner of change.
- 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.
- Okay, I'm back on page 52. I got a real "pull request" from jastix so I'm going to use it.
- Did page 52 steps and then clicked on "new line" as in page 53.
- $ git remote add jastix git://github.com/jastix/mygittest.git
fatal: remote jastix already exists. - Assumed step 39 is okay (did it a couple of hours ago) so continued.
- $ git remote show jastix
ERROR: Permission to jastix/mygittest denied to jasnow.
fatal: The remote end hung up unexpectedly - Unclear what I did wrong in step 41.
- $ git fetch jastix
ERROR: Permission to jastix/mygittest denied to jasnow.
fatal: The remote end hung up unexpectedly - Tried "git log" too and still got problems so I'm stopping here.
- Try Exercise 4 so I forked porky's porkygittest repository.
- $ 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. - Moved the directory under gitlocalrepo.
- $ 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 - Added a line to porkgittest's README file.
- Then "git add README"
- $ 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(-) - $ 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 - Sent Porky a "Pull Request" from the GitHub web site.
- EX#4: Fork/Clone/Edit/Add/Commit/Push/Request Pull
- Repeated steps 45-54 with RLGGHC's gittest repository.
- Sent RLGGHC and ashbb a Pull Request.
- Got a Pull Request from Porky, so I tried: $ git remote add porky git://github.com/porky/gittest.git and got not response.
- So I did: $ git remote show porky
fatal: protocol error: expected sha/ref, got '
*********'
No matching repositories found.
*********' - So I ran "git remote rm jastix" and "git remote rm kevintyll". Then "git remote show" and it shows only "origin".
- Stopping this post and move to the next one.
Monday, February 23, 2009
Chapter 20: Git and GitHub Course: Day 3
Summary of Day 3 Work Flow (pg.38-58):
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment