XK0-005 · Question #1278
XK0-005 Question #1278: Real Exam Question with Answer & Explanation
The correct answer is D: branch. After cloning a remote repository, the first Git operation to run when starting development on a new feature is to create a new branch. This ensures that feature work is isolated from the main codebase.
Question
After cloning a remote repository, a new feature of that project needs to be developed and integrated into the next major release. Which of the following is the first Git operation to run to begin working on this new feature immediately after the clone?
Options
- Amerge
- Binit
- Cdiff
- Dbranch
Explanation
After cloning a remote repository, the first Git operation to run when starting development on a new feature is to create a new branch. This ensures that feature work is isolated from the main codebase.
Common mistakes.
- A.
git mergeis used to combine changes from one branch into another, a step performed after a feature is developed, not at the beginning. - B.
git initinitializes a new Git repository; a repository that has just been cloned is already initialized. - C.
git diffdisplays the differences between commits, branches, or the working directory, and is used for reviewing changes, not for starting new feature development.
Concept tested. Git branching for feature development
Reference. https://git-scm.com/docs/git-branch
Topics
Community Discussion
No community discussion yet for this question.