Changes for page Getting Started with Git

Last modified by Bastian Triller on 2013/05/21 17:24

From version 213.1
edited by Bastian Triller
on 2013/04/21 14:58
Change comment: There is no comment for this version
To version 211.1
edited by Ray Kiddy
on 2012/09/13 01:19
Change comment: checking out of stash. very cool!

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.btriller
1 +XWiki.kiddyr
Content
... ... @@ -16,7 +16,6 @@
16 16  ** Scott Chacon (of GitHub) Video Intro [[http://www.youtube.com/watch?v=ZDR433b0HJY]]
17 17  ** [[This>>http://www.eecs.harvard.edu/~~cduan/technical/git/]] is an excellent tutorial on the basic concepts behind Git
18 18  ** [[Git for Computer Scientists>>http://eagain.net/articles/git-for-computer-scientists/]] gives another good view on the underlying concepts
19 -** [[Git For Ages 4 And Up>>https://lca2013.linux.org.au/wiki/Tutorials/Git_For_Ages_4_And_Up]]: video tutorial ([[mp4>>http://mirror.internode.on.net/pub/linux.conf.au/2013/mp4/Git_For_Ages_4_And_Up.mp4]], [[YouTube>>http://www.youtube.com/watch?v=1ffBJ4sVUb4]])
20 20  * Learn the basics.
21 21  ** [[Everyday GIT With 20 Commands Or So>>http://schacon.github.com/git/everyday.html]]
22 22  ** [[Free Online Pro Git book>>http://progit.org/book/]]
... ... @@ -175,7 +175,7 @@
175 175  
176 176  === Stash to Clean and Checkout from Stash to Work ===
177 177  
178 -Say that you have several different things going on in your project at any one time. How can you seperate them to check something in? You know about the "git stash" command, which cleans up your project. But what if you want part of the dirtiness, but not all of it?
177 +Say that you have several different things going on in your project at any one time. How can you seperate them to check something in? You know about the "git stash" command, which cleans up your project. But what if you want part of the dirtiness, but not all of it?
179 179  
180 180  Suppose you have file1.java, file2.java, file3.java, and file4.java. You have a single feature implemented in file1.java and file3.java and those edits stand on their own. If you are going to check in just file1.java and file3.java, you should test them on their own, without your other changes. First, do a "git stash". A "git status" will show you have no staged changes. Now do:
181 181  
... ... @@ -186,5 +186,5 @@
186 186  
187 187  {{/code}}
188 188  
189 -Now you have your two files and not the others and you can build and test them in a clear project before you check them in
188 +Now you have your two files and not the others and you can build and test them in a clear project before you check them in!
190 190  One odd thing I noticed is this. The "git diff" you were doing before the stash will show your changes. Now you have to do "git diff HEAD". Not completely sure why, but there it is.