Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
From version 169.1
edited by Kieran Kelleher
on 2011/04/01 15:58
on 2011/04/01 15:58
Change comment:
There is no comment for this version
To version 200.1
edited by David Avendasora
on 2011/04/29 12:50
on 2011/04/29 12:50
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -git 1 +Getting Started with Git - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. kieran1 +XWiki.avendasora - Content
-
... ... @@ -1,7 +1,6 @@ 1 -= Got Git? If not,Get Githere=1 += Got Git? No? Get Git = 2 2 3 -Just pick the latest release for your Mac architecture here: 4 -[[OS X dmg Installer>>http://code.google.com/p/git-osx-installer/]] 3 +* MacOS X: [[OS X dmg Installer>>http://code.google.com/p/git-osx-installer/]] 5 5 6 6 = Learning About git = 7 7 ... ... @@ -10,7 +10,7 @@ 10 10 * [[Excellent Concept Tutorial on Git>>http://www.eecs.harvard.edu/~~cduan/technical/git/]] 11 11 12 12 Have a Good Laugh here as Linus Torvalds Evangelizes git: 13 -//this is more fun than learning, but gives you insight into the motivation behind git !//12 +//this is more fun than learning, but gives you insight into the motivation behind git// 14 14 15 15 * [[Linus Torvalds talks about git>>http://www.youtube.com/watch?v=4XpnKHJAok8]] 16 16 ... ... @@ -24,8 +24,19 @@ 24 24 * [[Git User Manual>>http://www.kernel.org/pub/software/scm/git/docs/user-manual.html]] 25 25 * [[Git Reference>>http://gitref.org/index.html]] 26 26 27 - =GitGoodies=26 +Git Cheat Sheets 28 28 28 +* [[http://cheat.errtheblog.com/s/git/]] 29 +* [[http://ktown.kde.org/%7Ezrusin/git/git-cheat-sheet-medium.png]] 30 + 31 +Checkout (Clone) Wonder Source Code 32 + 33 +* [[Instructions>>http://wiki.objectstyle.org/confluence/display/WONDER/Downloading%2C+Building%2C+Installing+and+Upgrading+Wonder+Source+Code]] 34 + 35 += Git Goodies for WebObjects Developers = 36 + 37 +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 38 + 29 29 === Git Bash Completion === 30 30 31 31 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: ... ... @@ -45,92 +45,32 @@ 45 45 For those of you who just get panic attacks at the thought of using the Terminal, there is a commercial app for that: 46 46 [[Git Tower>>http://www.git-tower.com/]] 47 47 48 -I use Tower (bought it), but only for committing and fixing merge conflicts. I think Tower misses quite a bit of the flagship feature of GIT: branches. You can't see a branch tree graphically, like you can with gitX or even the command line (git log - --graph ---color, IIRC). But it's cool for committing. For everything else I use command line.49 - -Miguel Arroz58 +I use Tower (bought it), but only for committing and fixing merge conflicts. I think Tower misses quite a bit of the flagship feature of GIT: branches. You can't see a branch tree graphically, like you can with gitX or even the command line (git log -graph -color, IIRC). But it's cool for committing. For everything else I use command line. 59 + Miguel Arroz 50 50 51 -= Using git locally on a Subversion Working Copy = 61 +== Using git locally on a Subversion Working Copy == 52 52 53 -OK, so you are addicted to git, and now you have to work on a team project that is hosted in a remote subversion repository ... and it is making you depressed :-(. Well, you can use manage your local svn working copy using git and be happy again !63 +OK, so you are addicted to git, and now you have to work on a team project that is hosted in a remote subversion repository ... and it is making you depressed :-( . Well, you can use manage your local svn working copy using git and be happy again 54 54 55 - There is a git-svn tool (type man git-svn in the terminal for details), but that adds yet another tool into the mix that you have to learn. So while you could use it and YMMV for projects tht are going to be on svn forever,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]]instead, especially if you are typically working on one particular branch of the remote svn repository.65 +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]]. 56 56 57 -= I want to learn gitbefore I switch from Subversion=67 +== Git Concepts == 58 58 59 -(This kind of repeats some of the previous section, but that's on purpose so we can condition you brain to start using git right now ;-) ) 60 -Even while you are working with svn repositories, you can start learning and taking advantage of git right now by making your local svn working copy an actual local git repository. The idea is to use the appropriate ignore feature of each SCM system to ignore the hidden files of the other system. The concept is described here: 69 +=== Rebasing === 61 61 62 - [[**git+svn**WorkingProtocol>>http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage-subversion-with-git-branches.aspx]]71 +Rebasing is unique to git. There is no counterpart in Subversion. 63 63 64 - When you first learn about gitand yougoogle"gitvn"youwill learnabout a commandlinetool git-svn which works directlywith remotesvn repos. Unless you wantouse gitlocallytoswitch betweensvn branches,I don'trecommendit. Usethe**git+svn** approachoutlinedin above blog postinstead.73 +Rebasing cuts down on the spaghetti history of merging and helps to keep history nice and linear. 65 65 66 - Onceyou startusinggit,it becomes addictive.......youcan nevergo back......really, it'sthatgood......and itis nothard.75 +Conceptually, when I rebase my current branch A on another branch B, git removes all my branch A commits back to the common ancestor of A and B, stashes those commits away temporarily, moves the head of the current branch A to the tip of the other branch B, and then re-applys all my stashed commits as **new commit** patches to my branch B. 67 67 68 - SometipsforEclipse setupandgeneralworkflowwhenusinggitlocallyon svnworkingcopies,77 +However before using it on work that is shared with others you MUST follow the these rules, otherwise you will screw everyone else on the project. 69 69 70 -* check out the entire svn branch that you work on using the command line, then LINK (import no copy) the projects you want in your workspace using the Subclipse import tool, and 71 -* Do your git operations (status, staging, commit, diff, branching, checkouts, rebase and merge using the terminal). git on the terminal is efficient... honest. 72 -* Do all your local work and cimmits on branches other than the master branch. 73 -* Switch to master branch to update from svn and commit those svn updates on the master branch. 74 -* Merge your working branch(es) with or rebase your working branch(es) from the master and just keep on working. 75 -* Switch to master branch before synchronizing with remote svn repo. 76 -* You can use ##git stash## to temporarily put aside your uncommitted changes before doing an svn update. Then use ##git stash pop## to replay those uncommitted changes onto the working copy. 79 +* If you don't understand rebasing, don't use it 80 +* Use rebase on **private** branches 81 +* Use rebase for commits that have **not been pushed** to a remote repo 77 77 78 -{{code title="Mechanics of an svn update operation on a git-managed svn working copy"}} 79 - 80 - 81 -# Assume you are currently on a working branch. Verify this and check for uncommitted changes. 82 -git status 83 - 84 -# Either commit your local changes to your working branch 85 -# using 'git add' + 'git commit', or temporarily stash 86 -# them using 'git stash' 87 -git stash 88 - 89 -# Switch to master branch 90 -git checkout master 91 - 92 -# Ensure there are no changes either from an svn perspective 93 -# or a git perspective on the master branch. 94 -git status 95 -svn status 96 - 97 -# Update the master branch from remote svn repo 98 -svn update 99 - 100 -# Commit those updates to git repo 101 -git commit -a -m "updated from remote svn repo" 102 - 103 -# Switch to your working branch 104 -git checkout workingbranch 105 - 106 -# Merge or rebase your working branch off of the updated master. 107 -# This rewinds your branch commits back to the common commit ancestor 108 -# shared between your working branch and the master branch. Then it 109 -# applies the master branch commits (the svn updates) so that this 110 -# working branch becomes identical to the master. After that it 'replays' 111 -# your working branch commits on top of the updated branch. 112 -# This ensures a clean linear progression. Rebasing is a very cool feature of git. 113 -rebase master 114 - 115 -# Now if you stashed uncommitted changes earlier, you can pop them back into 116 -# the working copy 117 -git stash pop 118 - 119 -{{/code}} 120 - 121 -{{code title="Mechanics of an svn commit operation from a git-managed svn working copy"}} 122 - 123 -# First perform an svn update as outlined above in the previous section 124 - 125 -# Switch to the master branch 126 -git checkout master 127 - 128 -# Merge your working branch with the master 129 -git merge workingbranch 130 - 131 -# Use svn status, svn add and svn commit to commit your changes to the remote svn repository 132 - 133 -# Switch back to your workingbranch and get back to work. 134 - 135 - 136 -{{/code}} 83 +[[http://progit.org/book/ch3-6.html]] 84 +[[http://www.eecs.harvard.edu/~~cduan/technical/git/git-5.shtml]] 85 +[[http://book.git-scm.com/4_rebasing.html]] 86 +[[http://blip.tv/file/4094727]]