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

From KDE TechBase
(git stash)
m (Reverted edits by KennethMartinez (talk) to last revision by AnneW)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Once you're comfortable committing code with git, there are some simple things that can save you time and effort...
__NOINDEX__
 
{{warning|This page is obsolete. Proceed to [[Development/Git]]. }}
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>

Latest revision as of 15:49, 31 July 2012

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