Skip to content

Commit 42b2fb4

Browse files
author
Amin Jafari
committed
Merge branch 'advanced/01-git-stash'
2 parents f852f73 + 3951855 commit 42b2fb4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

git-stash.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Git Stash
2+
3+
The `git stash` command temporarily saves changes.
4+
5+
## Usage
6+
```bash
7+
git stash # Save changes
8+
git stash pop # Reapply changes
9+
```
10+
## Explanation
11+
- Use git stash to save uncommitted changes and switch branches.
12+
13+
- Use git stash pop to reapply the saved changes.
14+
15+
## Example
16+
```bash
17+
git stash
18+
git checkout main
19+
git stash pop
20+
```

0 commit comments

Comments
 (0)