Bird
0
0

Which of the following commands correctly pushes a new branch dev to the remote named origin?

easy📝 Syntax Q12 of 15
Git - Remote Repositories
Which of the following commands correctly pushes a new branch dev to the remote named origin?
Agit push origin/dev
Bgit push origin:dev
Cgit push dev origin
Dgit push origin dev
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct push syntax

    The command to push a branch is git push origin <branch-name>.
  2. Step 2: Match the branch and remote

    Here, origin is the remote and dev is the branch, so git push origin dev is correct.
  3. Final Answer:

    git push origin dev -> Option D
  4. Quick Check:

    Push syntax = git push origin branch [OK]
Quick Trick: Remember: remote first, then branch name [OK]
Common Mistakes:
  • Using colon instead of space between remote and branch
  • Swapping remote and branch order
  • Using slash notation incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes