- Had problems with understanding page 51-58, so I went back and tried it again.
- Summarized the commands on the pages: Originally on pages 54-58, the commands are:
git remote add ashbb git://github.com/ashbb/gittest.git
git remote show asbhh
git fetch ashbb
git log ashbb/master
git merge ashbb/master
get add fork.rb
git commit -m 'fork.rb commit with ashbb changes'
git push origin master
So to do it for porky, I would just
change "ashbb" to "porky" and
change "gittest" to "mygittest". - git remote add porky git://github.com/porky/mygittest.git (pg.54) (no response)
- $ git remote show -n porky (p.54) (Had to add "-n" before I got good response)
* remote porky
URL: git://github.com/porky/mygittest.git - Removed all my local repositories. Ran "git init" and cloned my "mygittest" repo.
- $ git remote add jastix git://github.com/jastix/mygittest.git (no response
- $ git remote show jastix (p.54)
* remote jastix
URL: git://github.com/jastix/mygittest.git
New remote branch (next fetch will store in remotes/jastix)
master - $ git fetch jastix (p.55)
remote: Counting objects: 5, done.←[K
remote: Compressing objects: 100% (2/2), done.←[K
remote: Total 3 (delta 0), reused 0 (delta 0)←[K
Unpacking objects: 100% (3/3), done.
From git://github.com/jastix/mygittest
* [new branch] master -> jastix/master - $ git log jastix/master (p.55)
commit 46a48026e4b05f579105a442a048d9df74be2ea7
Author: Nickolai
Date: Mon Feb 23 15:17:51 2009 +0300
new line
commit 2eca6e8195ee9a9043b300e0625fd09100ef6008
Author: Al Snow
Date: Sun Feb 22 12:54:57 2009 -0500
First commit - $ git merge jastix/master (p.55-56)
Merge made by recursive.
README | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README~ - No Merge Conflict -- WOW.
- "git add ." (no response) (p.54)
- $ git commit -m 'merged with jastix - he added line in README' (p.55)
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean) - git remote add kevintyll git://github.com/kevintyll/mygittest.git (p.54)
- $ git remote show kevintyll (p.54)
* remote kevintyll
URL: git://github.com/kevintyll/mygittest.git
New remote branch (next fetch will store in remotes/kevintyll)
master - $ git fetch kevintyll (p.55)
remote: Counting objects: 5, done.←[K
remote: Compressing objects: 100% (2/2), done.←[K
remote: Total 3 (delta 1), reused 0 (delta 0)←[K
Unpacking objects: 100% (3/3), done.
From git://github.com/kevintyll/mygittest
* [new branch] master -> kevintyll/master - $ git log kevintyll/master (p.55)
commit 8fbc15ac76e72646760f9d7e65a7affae372c31f
Author: Kevin Tyll
Date: Mon Feb 23 23:38:01 2009 -0500
modified README
commit 22b8b693c1935696e2acee48a4185a49ac39227d
Author: Al Snow
Date: Mon Feb 23 12:35:38 2009 -0500
adding fork.rb file
commit 2eca6e8195ee9a9043b300e0625fd09100ef6008
Author: Al Snow
Date: Sun Feb 22 12:54:57 2009 -0500
First commit - $ git merge kevintyll/master (p.55=56)
Auto-merging README
CONFLICT (content): Merge conflict in README
Automatic merge failed; fix conflicts and then commit the result. - Edited the file and kept 2 lines.
- $ git merge kevintyll/master (p.55-56)
fatal: You are in the middle of a conflicted merge. - Step 20 was a mistake (smile) so back to page 56.
- $ git add . (p.56)
warning: LF will be replaced by CRLF in h - $ git commit -m 'fix merge conflict with kevintyll changes' (p.56)
[master]: created f29253a: "fix merge conflict with kevintyll changes" - Suggestion: Add
(page feed) after each section/exercise for clean break. - OPEN QUESTION: How to "git push" merged repository?
- Got this with verbose: $ git push origin master -v
Pushing to git://github.com/jasnow/mygittest.git
Looking up github.com ... done.
Connecting to github.com (port 9418) ... 65.74.177.129 done.
fatal: read error (Invalid argument) - OPEN QUESTION: Why could I merge jastix and kevintyll but not porky?
- OPEN: THEREFORE I need more study time with this topic.
- See page 39 about the difference between the "public clone url" and "the clone url". The public one is READ-ONLY. See example on page 44.
- More details: "He made the mistake to copy the public clone URL to clipboard and not his own URL. So he forked the original master. And as long as you are not added to the list of collaborators from the project's owner, you are not allowed to push directly to his REPO.
When you fork, the project's owner can decide whether to apply your changes or not. So he is in control, if you are actually not yet a trustworthy collaborator." - BUT TIME TO MOVE ON (3:48pm)
Tuesday, February 24, 2009
Chapter 21: Git and GitHub Course: Day 3 (continued)
Summary of Day 3 Work Flow (pg.51-58):
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment