exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 317 discussion

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

A developer is adding a user experience improvement to an application and is working on a fork. The developer must push a new branch named ‘devcorexpv4g4h1h1y1r5l3w1t4’ to the remote repository named ‘PRODdevcorv01h1t2d1w5i6j4a5b’. The local branch must be updated to include any new changes that were pushed to the remote repository from other developers. Which Git command must be used?

  • A. git reset -f
  • B. git fetch -f
  • C. git merge --all
  • D. git pull --all
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
samael666
5 months ago
Selected Answer: D
correct, pull = fetch + commit
upvoted 1 times
...
3ca28d8
8 months ago
Selected Answer: D
D. git pull --all This command will fetch the changes from all branches from the remote repository and merge them into the current branch locally. It’s a combination of git fetch and git merge, which is what the developer needs to do to update their local branch with the changes from the remote repository. The other options do not perform both actions needed in this context.
upvoted 2 times
...
doble_h
1 year, 1 month ago
using git pull --all in this scenario will help you achieve the desired outcome of updating your local branch with changes from the remote repository.
upvoted 2 times
...
Pecoto
1 year, 4 months ago
A developer is adding a user experience improvement to an application and is working on a fork. The developer must push a new branch named ‘devcorexpv4g4h1h1y1r5l3w1t4’ to the remote repository named ‘PRODdevcorv01h1t2d1w5i6j4a5b’. The local branch must be updated to include "any new changes that were pushed" to the remote repository from other developers. Which Git command must be used? I put the question there because I need to point that we already pushed any new changes so be need to update only "local branch". I will go with B
upvoted 1 times
dkhenderson2
7 months, 3 weeks ago
Explanation: git fetch: This command fetches changes from the remote repository but does not merge them into the current branch. It simply updates the remote-tracking branches in the local repository. -f or --force: This flag is used to force the fetch operation, even if there are conflicts. While git fetch -f would update the remote-tracking branches, it wouldn't update the local branch with the new changes from the remote repository. Therefore, it wouldn't fulfill the requirement of updating the local branch with changes from other developers. Hence, option B is incorrect for this scenario.
upvoted 1 times
...
...
johntermlen
1 year, 4 months ago
Selected Answer: D
The answer is D. git pull --all. The git pull command is used to fetch and merge changes from a remote repository into the local repository. The -all option tells Git to fetch and merge all branches, including the remote tracking branches. In this scenario, the developer needs to push a new branch to the remote repository and then update the local branch to include any new changes that were pushed to the remote repository from other developers. The git pull --all command will do both of these things.
upvoted 1 times
...
Alexissiox
1 year, 7 months ago
Selected Answer: B
Local branch needs to be update so it's git fetch git pull with update the working directory....
upvoted 1 times
...
jithin1234
1 year, 7 months ago
Selected Answer: D
https://www.atlassian.com/git/tutorials/syncing/git-fetch When downloading content from a remote repo, git pull and git fetch commands are available to accomplish the task. You can consider git fetch the 'safe' version of the two commands. It will download the remote content but not update your local repo's working state, leaving your current work intact. git pull is the more aggressive alternative; it will download the remote content for the active local branch and immediately execute git merge to create a merge commit for the new remote content. If you have pending changes in progress this will cause conflicts and kick-off the merge conflict resolution flow.
upvoted 4 times
...
sandotxang
1 year, 9 months ago
Selected Answer: B
As per training material on cisco https://developer.cisco.com/learning/labs/dne-git-basic-workflows/keeping-your-local-repository-up-to-date/
upvoted 2 times
sandotxang
1 year, 8 months ago
I would change to git pull, as the local branch needs being updated according to the question
upvoted 4 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 ...