Bird
0
0

Which Git command is used to push a new branch to the remote repository to start a pull request?

easy📝 Syntax Q12 of 15
Git - Collaboration Workflows
Which Git command is used to push a new branch to the remote repository to start a pull request?
Agit push origin main
Bgit merge feature-branch
Cgit pull origin feature-branch
Dgit push origin feature-branch
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to push a branch

    To push a new branch named 'feature-branch' to remote, use 'git push origin feature-branch'.
  2. Step 2: Understand other options

    'git push origin main' pushes the main branch, 'git pull' fetches changes, and 'git merge' combines branches locally.
  3. Final Answer:

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

    Push new branch = git push origin branch-name [OK]
Quick Trick: Push your feature branch with git push origin branch-name [OK]
Common Mistakes:
  • Using git push origin main instead of feature branch
  • Confusing git pull with git push
  • Trying to merge before pushing the branch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes