IT quiz
All questions
Sign in
Sign up
JavaScript
HTML
CSS
PostgreSQL
PHP
Linux
Git
Docker
SCSS
TypeScript
SQL
Vue
DNS
Go
frontend (web)
Redis
backend
Gitlab
CI/CD
Vite
webpack
Node.js
HTTP
Python
Kotlin
Nuxt
Question #86
Author:
admin
tags:
Git
git stash
command...
...deletes all branches that were merged with the current branch.
...saves changes without committing, so you can switch to another branch.
...starts the garbage collector, which will delete all commits that are not referenced.
Answer
Show explanation
Use
git stash
when you want to record the current state of the working directory and the index, but want to go back to a clean working directory.
The command saves your local modifications away and reverts the working directory to match the
HEAD
commit.
The modifications stashed away by this command can be restored (potentially on top of a different commit) with
git stash apply
or
git stash pop
.
Rate the difficulty of the question:
1
2
3
4
5
6
7
8
9
10
easy
hard
←
Previous question
Next question
→
Write new comment