Changes for page Getting Started with Git
Last modified by Bastian Triller on 2013/05/21 17:24
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. kiddyr1 +XWiki.t_hoepfner - Content
-
... ... @@ -7,11 +7,17 @@ 7 7 ** MacOS X [[.dmg Binary Installers>>http://code.google.com/p/git-osx-installer/]] 8 8 ** Microsoft Windows [[.exe Binary Installers>>http://code.google.com/p/msysgit/]] 9 9 10 +{{info title="Git is included with XCode 4.x"}} 11 + 12 +XCode 4.x installs a copy of git in /usr/bin/git 13 + 14 +{{/info}} 15 + 10 10 = Learn About Git = 11 11 12 12 * Learn the concepts. 13 13 ** [[This>>http://www.eecs.harvard.edu/~~cduan/technical/git/]] is an excellent tutorial on the basic concepts behind Git 14 - 20 +** [[Git for Computer Scientists>>http://eagain.net/articles/git-for-computer-scientists/]] gives another good view on the underlying concepts 15 15 * Learn the basics. 16 16 ** [[Everyday GIT With 20 Commands Or So>>http://www.kernel.org/pub/software/scm/git/docs/everyday.html]] 17 17 ** [[Free Online Pro Git book>>http://progit.org/book/]] ... ... @@ -109,7 +109,7 @@ 109 109 110 110 === Versions? or Diffs? === 111 111 112 -One satori that I had while speaking to my git guru (thanks, Kieran !) 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.118 +One satori that I had while speaking to my git guru (thanks, Kieran) 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. 113 113 114 114 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. 115 115 ... ... @@ -122,3 +122,15 @@ 122 122 Might you end up with too many branches? Perhaps. How messy is your desk? If you are a clean-desk person, you will probably not have too many branches. You will organize and combine your branches. You will rebase your branches. You may delete your branches. After all, you had the thought. You can write the code again. If it is too distracting to keep the branch relevant, tuck the thought into the back of your head, delete the branch, let it go and move on. If you are a messy-desk person, you will probably have lots of branches. It would probably be a good thing to clean up, merge and rebase your branches before you try to share your changes. But that is obvious. Nobody wants to see how messy your desk is. 123 123 124 124 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. 131 + 132 += Git Everyday Tasks = 133 + 134 +=== How to revert? === 135 + 136 +Reverting is easy. The following command removes all modifications to files in your wqorking copy and brings them back to the HEAD. 137 + 138 +{{code}} 139 + 140 +git reset --hard 141 + 142 +{{/code}}