|
1 | 1 | ---
|
2 | 2 | published: false
|
3 | 3 | layout: post
|
4 |
| -title: stashing your changes |
| 4 | +title: stashing dina förändringar |
5 | 5 | category: beginner
|
6 | 6 | ---
|
7 | 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 |
| 8 | +Stashing är ett bra sätt att pausa det du håller på med just nu och komma tillbaka till det senare. Till exempel, du arbetar med en helt ny funktion och någon hittar en bug i den som du måste fixa. Du lägger till dina ändringar till indexet med: |
9 | 9 |
|
10 | 10 | @git add .@
|
11 | 11 |
|
12 |
| -Or add individual files to the index, your pick. Stash your changes away with: |
| 12 | +Eller lägg till enstaka filer till indexet om du vill. Stasha dina ändringar med: |
13 | 13 |
|
14 | 14 | @git stash@
|
15 | 15 |
|
16 |
| -And boom! You're back to your original working state. Got that bug fixed? Bring your work back with: |
| 16 | +Och boom! Du är tillbaka till ditt ursprungsläge. Har du fixat buggen nu? Gå tillbaka till ditt arbete med: |
17 | 17 |
|
18 | 18 | @git stash apply@
|
19 | 19 |
|
20 |
| -You can also do multiple layers of stashes, so make sure to use |
| 20 | +Du kan skapa flera lager med stash, så använd |
21 | 21 |
|
22 | 22 | @git stash list@
|
23 | 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: |
| 24 | +För att check out alla dina nuvarande. Om du behöver applya en stash länge ner i stacken är det också enkelt. För att lägga till din andra stash skriver du: |
25 | 25 |
|
26 | 26 | <code>git stash apply stash@{1}</code>
|
27 | 27 |
|
28 |
| -You can also easily apply the top stash on the stack by using ("Thanks jamesgolick!":http://jamesgolick.com/): |
| 28 | +Du kan enkelt lägga till den översta stashen på stacken genom att använda ("Tack jamesgolick!":http://jamesgolick.com/): |
29 | 29 |
|
30 | 30 | @git stash pop@
|
31 | 31 |
|
32 |
| -A note with this command, it deletes that stash for good, while apply does not. You can manually delete stashes with: |
| 32 | +Notera att det här kommandot raderar den stashen för gott, medan apply behåller den. Du kan radera stashes manuellt med kommandot: |
33 | 33 |
|
34 | 34 | @git stash drop <id>@
|
35 | 35 |
|
36 |
| -Or delete all of the stored stashes with: |
| 36 | +Eller radera alla lagrade stashes med: |
37 | 37 |
|
38 | 38 | @git stash clear@
|
0 commit comments