Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
From version 152.1
edited by Kieran Kelleher
on 2011/03/21 15:58
on 2011/03/21 15:58
Change comment:
There is no comment for this version
To version 153.1
edited by Kieran Kelleher
on 2011/03/21 18:46
on 2011/03/21 18:46
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -3,6 +3,7 @@ 3 3 [[Free Online Pro Git book>>http://progit.org/book/]] 4 4 [[Git User Manual>>http://www.kernel.org/pub/software/scm/git/docs/user-manual.html]] 5 5 [[Git Reference>>http://gitref.org/index.html]] 6 +[[Linus Torvalds talks about git>>http://www.youtube.com/watch?v=4XpnKHJAok8]] 6 6 7 7 = Install Git = 8 8 ... ... @@ -28,7 +28,7 @@ 28 28 29 29 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! 30 30 31 - Don't use thegit-svntool, 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.32 +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. 32 32 33 33 = I want to learn git before I switch from Subversion = 34 34 ... ... @@ -37,13 +37,13 @@ 37 37 38 38 [[**git+svn** Working Protocol>>http://www.lostechies.com/blogs/derickbailey/archive/2010/02/03/branch-per-feature-how-i-manage-subversion-with-git-branches.aspx]] 39 39 40 -When you first learn about git and you google "git svn" you will learn about a command line tool git-svn which works directly with remote svn repos ,howevermyadviceis don'tusegit-svn. Use the **git+svn** approach outlined in above blog post instead.41 +When you first learn about git and you google "git svn" you will learn about a command line tool git-svn which works directly with remote svn repos. Unless you want to use git locally to switch between svn branches, I don't recommend it. Use the **git+svn** approach outlined in above blog post instead. 41 41 42 42 Once you start using git, it becomes addictive ....... you can never go back ...... really, it's that good ...... and it is not hard. 43 43 44 44 Some tips for Eclipse setup and general workflow when using git locally on svn working copies, 45 45 46 -* check out the entire svn branch on the command line, then LINK (import no copy) the projects you want in your workspace using the Subclipse import tool, and 47 +* 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 47 47 * Do your git operations (status, staging, commit, diff, branching, checkouts, rebase and merge using the terminal). git on the terminal is efficient... honest. 48 48 * Do all your local work and cimmits on branches other than the master branch. 49 49 * Switch to master branch to update from svn and commit those svn updates on the master branch. ... ... @@ -51,19 +51,22 @@ 51 51 * Switch to master branch before synchronizing with remote svn repo. 52 52 * 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. 53 53 54 -{{ info title="Anatomony of an svn update operation on a git-managed svn working copy"}}55 +{{code title="Anatomony of an svn update operation on a git-managed svn working copy"}} 55 55 56 - {code}57 + 57 57 # Assume you are currently on a working branch. Verify this and check for uncommitted changes. 58 58 git status 59 59 60 -# Either commit your local changes to your working branch using {{git add}} + {{git commit}}, or temporarily stash them using {{git stash}} 61 +# Either commit your local changes to your working branch 62 +# using 'git add' + 'git commit', or temporarily stash 63 +# them using 'git stash' 61 61 git stash 62 62 63 63 # Switch to master branch 64 64 git checkout master 65 65 66 -# Ensure there are no changes either from an svn perspective or a git perspective on the master branch. 69 +# Ensure there are no changes either from an svn perspective 70 +# or a git perspective on the master branch. 67 67 git status 68 68 svn status 69 69 ... ... @@ -88,6 +88,5 @@ 88 88 # Now if you stashed uncommitted changes earlier, you can pop them back into 89 89 # the working copy 90 90 git stash pop 91 -{code} 92 92 93 -{{/ info}}96 +{{/code}}