When stashing changes, what happens to the staged and unstaged modifications in Git?

  • Staged changes are preserved, unstaged changes are discarded
  • Both staged and unstaged changes are preserved
  • Staged changes are discarded, unstaged changes are preserved
  • Both staged and unstaged changes are discarded
When you stash changes, Git saves both staged and unstaged changes. This allows you to switch branches without committing changes, and later apply the stash to continue working on the changes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *