Skip to content

Commit 3827de3

Browse files
committed
Adding stashing article and doing some cleanup on code styles
1 parent d4ea6ad commit 3827de3

5 files changed

+35
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*~
22
_site/
33
*.swp
4+
.DS_Store

_layouts/default.html

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ <h1><a href="/">git ready</a></h1>
2424
<div class="sidebar">
2525
<h3 id="green">beginner</h3>
2626
<div>
27+
<a href="/2009/01/10/stashing-your-changes.html">stashing your changes</a>
2728
{% for post in site.categories.beginner %}
2829
<a href="{{ post.url }}">{{ post.title }}</a>
2930
{% endfor %}

_posts/2009-01-09-checkout-remote-tracked-branch.textile

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ $ git remote show origin
2424

2525
Luckily, the command syntax for this is quite simple:
2626

27-
@git checkout --track -b <local branch> <remote>/<tracked branch>@
27+
<pre>
28+
git checkout --track -b
29+
<local branch> <remote>/<tracked branch>
30+
</pre>
2831

2932
So in my case, I used this command:
3033

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: post
3+
title: stashing your changes
4+
---
5+
6+
h2. {{ page.title }}
7+
8+
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
9+
10+
@git add .@
11+
12+
Or add individual files to the index, your pick. Stash your changes away with:
13+
14+
@git stash@
15+
16+
And boom! You're back to your original working state. Got that bug fixed? Bring your work back with:
17+
18+
@git stash apply@
19+
20+
You can also do multiple layers of stashes, so make sure to use
21+
22+
@git stash list@
23+
24+
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:
25+
26+
<code>git stash apply stash@{1}</code>

css/screen.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ a {
1919
a:visited {
2020
}
2121

22-
pre { padding: 10px 15px; word-wrap: break-word; text-align: left; font-size: 90%; }
2322

2423
p {
2524
text-align: left;
@@ -200,6 +199,9 @@ color: #aaa;
200199
border: 1px solid #ddd;
201200
background-color: #eef;
202201
padding: 0 .4em;
202+
text-align: left;
203+
font-size: 90%;
204+
margin: 0 15px;
203205
}
204206

205207
#post code {

0 commit comments

Comments
 (0)