exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 29 discussion

Actual exam question from Cisco's 350-901
Question #: 29
Topic #: 1
[All 350-901 Questions]


Refer to the exhibit. Which command resolves the merge conflict by removing the previous commit from the commit history?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: B

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 2 years, 4 months ago
B is the correct answer
upvoted 8 times
unknown_398
1 year, 7 months ago
I agree per section of this article: https://opensource.com/article/18/6/git-reset-revert-rebase-commands How to revert a Git commit The net effect of the git revert command is similar to reset, but its approach is different. Where the reset command moves the branch pointer back in the chain (typically) to "undo" changes, the revert command adds a new commit at the end of the chain to "cancel" changes. The effect is most easily seen by looking at Figure 1 again. If we add a line to a file in each commit in the chain, one way to get back to the version with only two lines is to reset to that commit, i.e., git reset HEAD~1.
upvoted 1 times
...
...
JCGO
Most Recent 10 months, 1 week ago
git reset -m -> mixed reset and preserves changes. B
upvoted 1 times
JCGO
10 months, 1 week ago
sorry. no such option :(
upvoted 1 times
...
...
Fedesarucho
1 year ago
https://linuxhint.com/remove-commit-from-history-git/ Go for B
upvoted 1 times
...
[Removed]
1 year, 6 months ago
removing the previous commit from the commit history ,,, i vote for b. once reset, the old commit are on a dead line of code, disappeared from the actual branch.
upvoted 2 times
beariver
1 year, 5 months ago
it is true, revert does not remove from history
upvoted 1 times
...
...
designated
1 year, 8 months ago
The correct answer is D cause B will delete the files and the merge will be not possible to be done.
upvoted 2 times
[Removed]
1 year, 6 months ago
maybe this is the key to "resolve the merge conflict" and choose D instead of B.
upvoted 1 times
...
...
G_I_Pet3r
1 year, 11 months ago
I believe it's D. From Command Line Git help. $ git revert --help "...Note: git revert is used to record some new commits to reverse the effect of some earlier commits" and the questions asks "...by removing the previous commit". If you want to throw away all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. Again, the questions asks "...by removing the previous commit" which "reset" doesn't do. So option B shouldn't be the answer.
upvoted 1 times
QuiShong
1 year, 10 months ago
Git revert adds a commit on top of the current commit. You'll overwrite whatever is coming from origin if I'm correct. You want to reset it back to the previous commit and then merge.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago