Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
From version 68.1
edited by Kieran Kelleher
on 2012/01/03 10:02
on 2012/01/03 10:02
Change comment:
There is no comment for this version
To version 91.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
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -16,16 +16,13 @@ 16 16 = Learn About Git = 17 17 18 18 * Learn the concepts. 19 -** Scott Chacon (of GitHub) Video Intro [[http://www.youtube.com/watch?v=ZDR433b0HJY]] 20 20 ** [[This>>http://www.eecs.harvard.edu/~~cduan/technical/git/]] is an excellent tutorial on the basic concepts behind Git 21 21 ** [[Git for Computer Scientists>>http://eagain.net/articles/git-for-computer-scientists/]] gives another good view on the underlying concepts 22 22 * Learn the basics. 23 23 ** [[Everyday GIT With 20 Commands Or So>>http://www.kernel.org/pub/software/scm/git/docs/everyday.html]] 24 24 ** [[Free Online Pro Git book>>http://progit.org/book/]] 25 -*** There is even a free epub version for your iPad/iPhone [[https://github.s3.amazonaws.com/media/progit.epub]] 26 26 27 27 * Get familiar with the reference materials available online 28 -** [[Git Community Book>>http://book.git-scm.com/]] 29 29 ** Official [[Git Documentation>>http://git-scm.com/documentation]] Site 30 30 ** Official [[Git User Manual>>http://www.kernel.org/pub/software/scm/git/docs/user-manual.html]] 31 31 ** [[Git Reference>>http://gitref.org/index.html]] ... ... @@ -45,13 +45,10 @@ 45 45 46 46 = Use Git with a Subversion Project = 47 47 48 -OK, so you want to use Git but you are working on a team project that is hosted in a subversion repository ... and it is making you depressed :-( . Well, you can still use Git to manage your local SVN working copy and be almosthappy again(Either way, you won't be 100% happy unless the repository is a git one.)45 +OK, so you want to use Git but you are working on a team project that is hosted in a subversion repository ... and it is making you depressed :-( . Well, you can still use Git to manage your local SVN working copy and be happy again 49 49 50 - Thereareacouplewaysofdoingthis.Twohem:47 +I recommend you just use the [[git+svn protocol>>http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage-subversion-with-git-branches.aspx]]. 51 51 52 -* Follow these [[Instructions>>http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage-subversion-with-git-branches.aspx]] to manually set up the integration. 53 -* Use [[SourceTree>>http://itunes.apple.com/us/app/sourcetree-git-hg/id411678673?mt=12]] which can clone your SVN repository locally as a full Git repository including all historical SVN commits and their metadata. 54 - 55 55 = Git Goodies for WebObjects Developers = 56 56 57 57 This is a list of tools that other WebObjects developers have found to be helpful. It's not a comprehensive list, and if you find things not listed here please add them ... ... @@ -75,20 +75,11 @@ 75 75 This is really an absolute necessity and a **huge** productivity improvement. Basically you need the bash completion script from the source tarball and use your shell profile to include it whenever you open a shell. See the **Auto-Completion** section on this page: 76 76 [[Git Bash Auto-Completion>>http://progit.org/book/ch2-7.html]] 77 77 78 -=== SourceTree by Atlassian===72 +=== GitX git GUI === 79 79 80 -SourceTree is a free Git/Mercurial GUI for OS X. A key feature is that it can use git-svn to "Clone" a SVN repository into a standard Git repository with your full SVN commit history and maintains a link back to the SVN repository. This allows you to easily use Git locally for development but still do your final commits to SVN. 74 +GitX is an awesome FREE history viewer made for OS X. It is a better way to visualize your branch and commit history of your git repository. However, power users (aka "cool kids") will probably only use it for history viewing while they continue to use the terminal command line for checkouts, branching, staging, rebasing and committing. 75 +[[GitX Home Page>>http://gitx.frim.nl/]] 81 81 82 -* [[SourceTree on AppStore>>http://itunes.apple.com/us/app/sourcetree-git-hg/id411678673?mt=12]] 83 -* [[SourceTree Home Page>>http://www.sourcetreeapp.com/]] 84 - 85 -=== GitX (L) git GUI === 86 - 87 -While most (if not all) Git GUI apps will never be able to emulate all the intricate functionality of Git, one advantage of a GUI app is more convenient and faster browsing/visualization of history and inter-relationships of branches. While development on the original open source GitX.app has waned, this fork of the original has continued to mature into a nice Git client, and is useful for common every day Git operations. However, power users (aka "cool kids") will probably only use it for history viewing while they continue to use the terminal command line for checkouts, branching, staging, rebasing and committing. 88 -[[GitX (L) Home Page>>http://gitx.laullon.com/]] 89 - 90 -Note this app replaces the original [[GitX>>http://gitx.frim.nl/]] by Pieter de Bie. 91 - 92 92 === Open in GitX === 93 93 94 94 [[Open In GitX Finder Droplet>>http://code.google.com/p/git-osx-installer/wiki/OpenInGitX]] ... ... @@ -128,15 +128,13 @@ 128 128 129 129 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. 130 130 131 -=== TestingaPull-Request===116 +=== Versions? or Diffs? === 132 132 133 - It maynot be obvioushowtodothis.Ifoneis acommitter,thereis a buttononecanpush toautomaticallyaccept apull-request.But is thisreallyasafe thingtodo?Buthow canyouget the diffsbeingsuggested?Itseemsmorecomplicatedthanitneedstobetomerge thebranchthepull-requestwas made from.Onecan actuallysea URLthatspecifiesjust the diff.Ifthe pull-request isat[[https://github.com/projectwonder/wonder/pull/43]], onecando:118 +One satori that I had is this. Subversion is all about versions. CVS was all about versions. We have been working with these a long time and the ideas are sticky. Git is //not// about versions. It is about diffs. Diffs are the main thing. If you think about it, this makes sense. You have thoughts and make changes and those diffs are the product of your work. If you get those diffs into something, that is good, but the work product was the diffs. 134 134 135 -{{code}} 136 -curl 'https://github.com/projectwonder/wonder/pull/43.patch' | git am 137 -{{/code}} 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. 138 138 139 - The curlfetches thediff.Take offthe"git am"tojustsee thediffs.The"gitam"merges the diffs. Thenyoumaybuildand test the pull-request.Anormalpushwill push thecode into the repository.122 +Internally, git keeps track of text fragments and not files. Why is this? Because the versions are not the point. The diffs are. I can imagine how Linus Torvalds had this idea. He was looking at all the versions of all the files in Linux and all the e-mails of all the diffs. These are two separate worlds. It is conceptually painful to look at every diff, find its source and see how it maps to what now exists. At some point, he must have realized that all he needed was the e-mails. If he had no files any longer, but all the e-mails, he could always reconstruct the files. He would not have to make the conceptual switch from the diffs to the versions and back. Collectively, those e-mails with the diffs defined everything that needed to be said. Quod erat demonstrandum. 140 140 141 141 === How Easy Are Branches? === 142 142 ... ... @@ -146,10 +146,6 @@ 146 146 147 147 Keep in mind that the difficult part of what you do should be the thinking. Git makes it easy to organize and share your thoughts as branches. Your local copies may be messy or not. They are the thoughts you have in your head and lots of those thoughts will stay there and never see the light of day and that is ok. But when you have clarified your thoughts, git will make it easy to share them. 148 148 149 -=== Finding the List of All Git Commands === 150 - 151 -The "git help" command gives one the list of commonly used git commands. How does one find the others, since some of them turn out to be very useful? I tried "git help v". That was wrong. It would have been better to try "git help help", but this did tell me about the -all flag, which actually lists out all of the commands, and there are quite a few of them. So, good hunting. 152 - 153 153 = Git Everyday Tasks = 154 154 155 155 === How to revert? ===