Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
From version 144.1
edited by Kieran Kelleher
on 2011/03/22 01:44
on 2011/03/22 01:44
Change comment:
There is no comment for this version
To version 145.1
edited by Kieran Kelleher
on 2011/03/21 15:56
on 2011/03/21 15:56
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -3,7 +3,6 @@ 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]] 7 7 8 8 = Install Git = 9 9 ... ... @@ -11,11 +11,6 @@ 11 11 12 12 = Git Goodies = 13 13 14 -=== Git Bash Completion === 15 - 16 -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. Just google "git bash completion" or check out the tips here to set it up: 17 -[[Git Bash Completion>>http://superuser.com/questions/31744/how-to-get-git-completion-bash-to-work-on-mac-os-x]] 18 - 19 19 === GitX git GUI === 20 20 21 21 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. ... ... @@ -34,7 +34,7 @@ 34 34 35 35 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! 36 36 37 - There is a git-svn tool (type mangit-svnin the terminal for details), but that addsyetanothertool into the mix that you have to learn. So while you could use it and YMMV for projects tht aregoingto be onsvnforever,I recommend youjust 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.31 +Don't use the git-svn tool, 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. 38 38 39 39 = I want to learn git before I switch from Subversion = 40 40 ... ... @@ -43,13 +43,13 @@ 43 43 44 44 [[**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]] 45 45 46 -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 youwant to usegit locallyto switch betweensvnbranches, Idon'trecommendit. Use the **git+svn** approach outlined in above blog post instead.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, however my advice is don't use git-svn. Use the **git+svn** approach outlined in above blog post instead. 47 47 48 48 Once you start using git, it becomes addictive ....... you can never go back ...... really, it's that good ...... and it is not hard. 49 49 50 50 Some tips for Eclipse setup and general workflow when using git locally on svn working copies, 51 51 52 -* check out the entire svn branch that you work onusingthe command line, then LINK (import no copy) the projects you want in your workspace using the Subclipse import tool, and46 +* 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 53 53 * Do your git operations (status, staging, commit, diff, branching, checkouts, rebase and merge using the terminal). git on the terminal is efficient... honest. 54 54 * Do all your local work and cimmits on branches other than the master branch. 55 55 * Switch to master branch to update from svn and commit those svn updates on the master branch. ... ... @@ -57,22 +57,19 @@ 57 57 * Switch to master branch before synchronizing with remote svn repo. 58 58 * 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. 59 59 60 -{{ codetitle="Mechanicsof an svn update operation on a git-managed svn working copy"}}54 +{{info title="Anatomony of an svn update operation on a git-managed svn working copy"}} 61 61 62 - 56 +{{ 63 63 # Assume you are currently on a working branch. Verify this and check for uncommitted changes. 64 64 git status 65 65 66 -# Either commit your local changes to your working branch 67 -# using 'git add' + 'git commit', or temporarily stash 68 -# them using 'git stash' 60 +# Either commit your local changes to your working branch using {{git add}} + {{git commit}}, or temporarily stash them using {{git stash}} 69 69 git stash 70 70 71 71 # Switch to master branch 72 72 git checkout master 73 73 74 -# Ensure there are no changes either from an svn perspective 75 -# or a git perspective on the master branch. 66 +# Ensure there are no changes either from an svn perspective or a git perspective on the master branch. 76 76 git status 77 77 svn status 78 78 ... ... @@ -97,22 +97,6 @@ 97 97 # Now if you stashed uncommitted changes earlier, you can pop them back into 98 98 # the working copy 99 99 git stash pop 91 +}} 100 100 101 -{{/code}} 102 - 103 -{{code title="Mechanics of an svn commit operation from a git-managed svn working copy"}} 104 - 105 -# First perform an svn update as outlined above in the previous section 106 - 107 -# Switch to the master branch 108 -git checkout master 109 - 110 -# Merge your working branch with the master 111 -git merge workingbranch 112 - 113 -# Use svn status, svn add and svn commit to commit your changes to the remote svn repository 114 - 115 -# Switch back to your workingbranch and get back to work. 116 - 117 - 118 -{{/code}} 93 +{{/info}}