Bird
0
0

After running git remote add origin https://example.com/repo.git, which command shows the URL of the remote named 'origin'?

easy📝 Conceptual Q2 of 15
Git - Remote Repositories
After running git remote add origin https://example.com/repo.git, which command shows the URL of the remote named 'origin'?
Agit remote get-url origin
Bgit remote list origin
Cgit remote show origin
Dgit remote url origin
Step-by-Step Solution
Solution:
  1. Step 1: Recall command to get remote URL

    The command git remote get-url <name> returns the URL of the specified remote.
  2. Step 2: Match the command with 'origin'

    Using git remote get-url origin will display the URL linked to 'origin'.
  3. Final Answer:

    git remote get-url origin -> Option A
  4. Quick Check:

    Command to show remote URL = git remote get-url [OK]
Quick Trick: Use 'git remote get-url origin' to see remote URL [OK]
Common Mistakes:
  • Using 'git remote show origin' which shows more info, not just URL
  • Typing 'git remote list origin' which is invalid
  • Using 'git remote url origin' which is not a valid command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes