EMERGING TRENDS IN SOFTWARE ENGINEERING
MISCELLANEOUS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Rollback
|
|
Committed
|
|
Modified
|
|
Staged
|
Detailed explanation-1: -reset–soft : History changed, HEAD changed, Working directory is not changed. reset–mixed : History changed, HEAD changed, Working directory changed with unstaged data. reset–hard : History changed, HEAD changed, Working directory is changed with lost data. It is always safe to go with Git–soft.
Detailed explanation-2: -git reset–soft, which will keep your files, and stage all changes back automatically. git reset–hard, which will completely destroy any changes and remove them from the local directory. Only use this if you know what you’re doing.
Detailed explanation-3: -Find the commit ID of the version of the file you want to revert to. Find the path to the file you want to revert from the working directory. In the terminal, change directories to the working directory. Type git checkout [commit ID]–path/to/file and hit enter. Commit the change to the reverted file. 13-Jun-2020