nerdexam
CompTIA

XK0-005 · Question #707

The development team created a new branch with code changes that a Linux administrator needs to pull from the remote repository. When the administrator looks for the branch in Git, the branch in…

The correct answer is A. git fetch. git fetch is the command used to refresh the list of branches from the remote repository. It retrieves any new branches and updates the local metadata about the remote repository, making the branch visible locally. It does not change the working directory or merge any changes…

Troubleshooting

Question

The development team created a new branch with code changes that a Linux administrator needs to pull from the remote repository. When the administrator looks for the branch in Git, the branch in question is not visible. Which of the following commands should the Linux administrator run to refresh the branch information?

Options

  • Agit fetch
  • Bgit checkout
  • Cgit clone
  • Dgit branch

How the community answered

(27 responses)
  • A
    89% (24)
  • B
    7% (2)
  • D
    4% (1)

Explanation

git fetch is the command used to refresh the list of branches from the remote repository. It retrieves any new branches and updates the local metadata about the remote repository, making the branch visible locally. It does not change the working directory or merge any changes but updates the references.

Topics

#Git#Version Control#Remote Repositories#Branch Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice