Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 29 lines (16 sloc) 0.936 kb
3827de3 @qrush Adding stashing article and doing some cleanup on code styles
qrush authored
1 ---
2 layout: post
3 title: stashing your changes
4 ---
5
6 Stashing is a great way to pause what you're currently working on and come back to it later. For example, if you working on that awesome, brand new feature but someone just found a bug that you need to fix. Add your changes to the index using
7
8 @git add .@
9
10 Or add individual files to the index, your pick. Stash your changes away with:
11
12 @git stash@
13
14 And boom! You're back to your original working state. Got that bug fixed? Bring your work back with:
15
16 @git stash apply@
17
18 You can also do multiple layers of stashes, so make sure to use
19
20 @git stash list@
21
22 To check out all of your current ones. If you need to apply a stash from deeper in the stack, that's easy too. Here's how to apply the second stash you've got:
23
24 <code>git stash apply stash@{1}</code>
abd8980 @qrush Sunday's post on reverting files, sprucing up the site a bit
qrush authored
25
26 You can also easily apply the top stash on the stack by using ("Thanks jamesgolick!":http://jamesgolick.com/):
27
28 @git stash pop@
Something went wrong with that request. Please try again.