nerdexam
CompTIA

XK0-006 · Question #12

A Linux administrator is making changes to local files that are part of a Git repository. The administrator needs to retrieve changes from the remote Git repository. Which of the following commands…

The correct answer is A. git stash. The git stash command temporarily saves local modifications without committing them, allowing the administrator to safely run git pull or git fetch later and then reapply the saved changes.

Automation and Scripting

Question

A Linux administrator is making changes to local files that are part of a Git repository. The administrator needs to retrieve changes from the remote Git repository. Which of the following commands should the administrator use to save the local modifications for later review?

Options

  • Agit stash
  • Bgit pull
  • Cgit merge
  • Dgit fetch

How the community answered

(49 responses)
  • A
    94% (46)
  • C
    2% (1)
  • D
    4% (2)

Explanation

The git stash command temporarily saves local modifications without committing them, allowing the administrator to safely run git pull or git fetch later and then reapply the saved changes.

Topics

#git stash#Git#local modifications#version control

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice