Which description matches git reset --soft?

Dive into the Architect Journey – Development Lifecycle and Deployment Exam. Prep with tailored flashcards, explore multiple choice questions with detailed explanations, and enhance your readiness for the test!

Multiple Choice

Which description matches git reset --soft?

Explanation:
git reset --soft moves the branch pointer to a specified commit while keeping the index and working directory as they were. The practical result is that the changes from the commits you moved past are left staged for a new commit. This is useful when you want to rework history—reorder or combine commits—without altering the actual changes themselves. It doesn’t touch files in the working directory, doesn’t destroy commits, and doesn’t auto-create a new commit. So, the description that fits is that it takes the identified commit(s) and places all of the changes in the staging area.

git reset --soft moves the branch pointer to a specified commit while keeping the index and working directory as they were. The practical result is that the changes from the commits you moved past are left staged for a new commit. This is useful when you want to rework history—reorder or combine commits—without altering the actual changes themselves. It doesn’t touch files in the working directory, doesn’t destroy commits, and doesn’t auto-create a new commit. So, the description that fits is that it takes the identified commit(s) and places all of the changes in the staging area.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy