MCQ Detail
Search MCQs, Papers, Topics
AI
easy
In Git, Which Command Is Used To Create A New Branch?
A.
git commit -b
✓
✗
B.
git branch <name>
✓
✗
C.
git push --new
✓
✗
D.
git init branch
✓
✗
The command git branch <name> creates a new branch in Git. To also switch to it immediately, git checkout -b <name> or git switch -c <name> can be used.
Git
Branch
Version Control
Git Command
Branching
Submitting...
🚀 Found an error or have a suggestion?
Your feedback helps us keep our MCQs accurate and up-to-date.
Related MCQs
Related MCQs where subject and topic are same as this mcq
AI
easy
Question 1: Which of the following best describes Git?
Git is a distributed version control system used to track code changes.
Git
Version Control
Software Development
Repository
AI
easy
Question 2: Which Git command is used to send local commits to a remote repository?
git push uploads local committed changes to a remote repository.
Git
Push
Repository
Version Control
AI
medium
Question 3: Which of the following are benefits of version control systems?
Version control helps teams collaborate, track changes, and preserve revision history.
Version Control
Git
Collaboration
History
AI
medium
Question 4: What is the purpose of branching in Git?
Branching allows developers to work on new features or fixes without affecting the main code immediately.
Git
Branching
Development
Workflow
AI
easy
Question 5: Which Git command is used to download a repository from a remote source for the first time?
git clone is used to copy an existing remote repository to a local machine.
Git
Clone
Repository
Remote