Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
From version 92.1
edited by Kieran Kelleher
on 2011/07/27 15:33
on 2011/07/27 15:33
Change comment:
There is no comment for this version
To version 95.1
edited by Kieran Kelleher
on 2011/08/10 22:12
on 2011/08/10 22:12
Change comment:
This paragraph is actually fairly inaccurate and the concepts are not accurate. Sorry Ray :-)
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -21,6 +21,7 @@ 21 21 * Learn the basics. 22 22 ** [[Everyday GIT With 20 Commands Or So>>http://www.kernel.org/pub/software/scm/git/docs/everyday.html]] 23 23 ** [[Free Online Pro Git book>>http://progit.org/book/]] 24 +*** There is even a free epub version for your iPad/iPhone [[https://github.s3.amazonaws.com/media/progit.epub]] 24 24 25 25 * Get familiar with the reference materials available online 26 26 ** Official [[Git Documentation>>http://git-scm.com/documentation]] Site ... ... @@ -113,13 +113,15 @@ 113 113 114 114 What if one wants to generate a pull request the origin and also push to a fork? You would do this if you were not a Wonder committer but wanted to share code. You organize your changes in your local repository/branch and, from the clean repository or branch, generate the pull request and, separately, push the changes to your fork. 115 115 116 -=== Versions?orDiffs?===117 +=== Testing a Pull-Request === 117 117 118 - OnesatorithatI hadisthis.Subversion is allaboutversions.CVS wasall aboutversions.Wehave beenworking with thesealongtimeandtheideasareicky.Git is //not// aboutversions.Itboutdiffs.Diffsre the main thing.If youthinkaboutit,thismakessense.Youhavethoughtsandmakechangesand thosediffsare theproductof your work.Ifyougetthosediffsintosomething,that isgood, but thek productwas the diffs.119 +It may not be obvious how to do this. If one is a committer, there is a button one can push to automatically accept a pull-request. But is this really a safe thing to do? But how can you get the diffs being suggested? It seems more complicated than it needs to be to merge the branch the pull-request was made from. One can actually use a URL that specifies just the diff. If the pull-request is at [[https://github.com/projectwonder/wonder/pull/43]], one can do: 119 119 120 -All this rebasing and such may seem odd. But the main thing is the diffs. I have edits from a two-week old repository. What do I do? I move the diffs so that they are diffs from the latest code. That is a rebase. When we make edits, we are used to being over-concerned about merge conflicts. But they do not happen all that often and are actually easy to deal with when they do, if the tools are oriented to making them easy to deal with. If we are worrying about the versions and not the diffs, we are paying attention to the paper we write on and not to the words we are putting down. 121 +{{code}} 122 +curl 'https://github.com/projectwonder/wonder/pull/43.patch' | git am 123 +{{/code}} 121 121 122 - Internally,git keeps track of text fragmentsand notfiles. Why isthis? Because theversionsare notthepoint. Thediffs are.I can imaginehowLinus Torvalds hadthis idea.He was lookingat allthe versionsof allthefilesin Linux and all the-mailsof allthe diffs. Thesearetwoseparateworlds.Itis conceptuallypainful to look at everydiff, find itssourceandsee howitmapstowhatnowexists.Atsome point,hemust have realized that all heneeded washe e-mails.Ifhe hadnofiles any longer, but all the e-mails,he could alwaysreconstruct thefiles. He wouldnot have to make the conceptualswitchfromthediffs totheversions and back. Collectively, thosee-mails withthediffs defined everything that needed tobesaid. Quod eratdemonstrandum.125 +The curl fetches the diff. Take off the "git am" to just see the diffs. The "git am" merges the diffs. Then you may build and test the pull-request. A normal push will push the code into the repository. 123 123 124 124 === How Easy Are Branches? === 125 125