Bird
0
0

You have a local branch feature3 and want to push it to a remote named upstream instead of origin. What is the correct command?

hard📝 Application Q9 of 15
Git - Remote Repositories
You have a local branch feature3 and want to push it to a remote named upstream instead of origin. What is the correct command?
Agit push -u feature3 upstream
Bgit push origin feature3
Cgit push upstream feature3
Dgit push feature3 upstream
Step-by-Step Solution
Solution:
  1. Step 1: Identify remote and branch order

    The syntax is git push <remote> <branch>. So pushing to 'upstream' remote requires git push upstream feature3.
  2. Step 2: Check invalid options

    Options with swapped remote and branch names or wrong flags are invalid.
  3. Final Answer:

    git push upstream feature3 -> Option C
  4. Quick Check:

    Push syntax: git push remote branch [OK]
Quick Trick: Specify correct remote before branch in push command [OK]
Common Mistakes:
  • Swapping remote and branch names
  • Using default origin when another remote is needed
  • Incorrect flag usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes