Jump to content

Dev Core 350-901 DRAG and DROP git reset


kdjulianofr

Recommended Posts

Drag and drop the steps from the left into the correct sequence on the right to describe how to use Git to maintain the current HEAD and revert back 
to a previous commit, while undoing all intermediate commits

image.png.540b939d5d37e8b1601ac858990d387b.png

1. What is the goal of this command: 
git reset -–soft HEAD@{1} 
wouldn't the command:
git reset hard 56e05fced already accomplished what's needed? That is reverting back to a previous commit, while undoing all intermediate commits.


2. Does it really matter where the git status command goes?
It does not impact the final outcome. It could be used as verification right before or after the git commit -m “Revert to 56e05fced commit” 
thoughts?
Thanks,

  • Like 4
  • Thanks 2
  • Confused 1
Link to comment
Share on other sites

  • 3 months later...

According to Kayleen from examtopics(dot)com:

You need to first do git log to find the commit number (56...). Then you do git reset --hard 56 to go back to that commit (this will only reset your local branch, your remote if you have it is still at the commit you had at the beginning). Then you do git reset --soft HEAD@{1} which will go back to where you were before git reset --hard BUT it will leave the files alone (how they were at 56). And at this point you can do git commit. This last commit will be on top of what you had at the beginning but the files will be from 56. Which is what the commit says.

So should be:

1. git log

2. git reset --hard 56e05fced

3. git reset --soft HEAD@{1}

4. git status

5. git commit -m "Revert to 56e05fced commit"

Edited by MacGyver
  • Like 1
Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
On 8/17/2022 at 3:19 AM, SimonKN said:

Hello!

The newest 350-901 exam questions from Google Drive files FYI:

(310q+ New Version)

If that Google Drive link is not available in your area, try to get 350-901 dumps PDF from OpenDrive here:

(310q+ New Version)

Good luck!

This is NO Requests section; go to Offers / shares section!!!

Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...