Difference between revisions of "Archive:Development/Tutorials/Git/Intermediate"

Jump to: navigation, search
(Replaced content with '{{warning|This page is obsolete. Proceed to Development/Git. }}')
Line 1: Line 1:
{{warning|This page is yet to be reviewed for changes required by the migration to Git.  Information and commands on this page may no longer be valid and should be used with care. Please see the [[Development/Git|KDE Git hub page]] for more details. }}
+
{{warning|This page is obsolete. Proceed to [[Development/Git]]. }}
 
+
Once you're comfortable committing code with git, there are some simple things that can save you time and effort...
+
 
+
TODO
+
*feature branches for fun and profit
+
*shared branches?
+
 
+
== Handling local changes: git stash ==
+
 
+
Sometimes (eg. when using git svn rebase) Git won't let you proceed if you have uncommitted changes. If you don't want to commit those changes, you can use git stash instead. This command stores the local changes safely out of the way on a stack. When you want those changes back it can re-apply them to your repository and clear the stack. A very handy feature in many situations! Just do this:
+
 
+
<code>
+
git stash
+
git svn rebase # or whatever it was you were trying to do
+
git stash pop # apply-and-clear
+
</code>
+
 
+
There are more features of git stash explained in the fine manual. :)
+
<code>
+
git help stash
+
</code>
+

Revision as of 21:28, 28 April 2011

noframe
 
Warning
This page is obsolete. Proceed to Development/Git.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal