EMERGING TRENDS IN SOFTWARE ENGINEERING
DEVOPS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which type of reset could you use if you’d like to get rid of all your changes?
|
git reset ____ soft
|
|
git reset ____ mixed
|
|
git reset ____ hard
|
|
git reset ____ skip
|
Explanation:
Detailed explanation-1: -There are two Git commands a developer must use in order to discard all local changes in Git, remove all uncommited changes and revert their Git working tree back to the state it was in when the last commit took place. The commands to discard all local changes in Git are: git reset –hard. git clean-fxd.
Detailed explanation-2: -Git reset hard undoes changes and removes the associated files from the working directory, staging area, and commit history. Git reset soft undoes the changes to the index. Git reset mixed untracks files without deleting them from the working area.
Detailed explanation-3: -To review, git reset is a powerful command that is used to undo local changes to the state of a Git repo.
There is 1 question to complete.