Bird
0
0

You want to push your local branch dev to a new remote branch named release. Which command achieves this?

hard📝 Workflow Q8 of 15
Git - Remote Repositories
You want to push your local branch dev to a new remote branch named release. Which command achieves this?
Agit push origin dev
Bgit push origin release:dev
Cgit push origin -b release dev
Dgit push origin dev:release
Step-by-Step Solution
Solution:
  1. Step 1: Understand branch refspec syntax

    To push local branch dev to remote branch release, use git push origin dev:release.
  2. Step 2: Analyze other options

    release:dev reverses source and destination; git push origin dev pushes to remote branch dev; -b is invalid for push.
  3. Final Answer:

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

    Use local:remote branch syntax to rename on push [OK]
Quick Trick: Use 'local:remote' to push to different remote branch [OK]
Common Mistakes:
  • Swapping source and destination branches
  • Using invalid flags with push
  • Assuming push renames local branch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes