Bird
0
0

You want to add a remote named backup pointing to git@personalserver.com:repo.git and push your local main branch. Which sequence of commands correctly accomplishes this?

hard📝 Workflow Q9 of 15
Git - Remote Repositories
You want to add a remote named backup pointing to git@personalserver.com:repo.git and push your local main branch. Which sequence of commands correctly accomplishes this?
Agit remote add backup git@personalserver.com:repo.git<br>git push backup main
Bgit clone backup git@personalserver.com:repo.git<br>git push origin main
Cgit remote set-url backup git@personalserver.com:repo.git<br>git pull backup main
Dgit fetch backup git@personalserver.com:repo.git<br>git push origin main
Step-by-Step Solution
Solution:
  1. Step 1: Add remote

    Use git remote add backup git@personalserver.com:repo.git to add the new remote named backup.
  2. Step 2: Push branch

    Use git push backup main to push your local main branch to the backup remote.
  3. Final Answer:

    git remote add backup git@personalserver.com:repo.git
    git push backup main
    -> Option A
  4. Quick Check:

    Add remote then push branch to it [OK]
Quick Trick: Add remote then push branch to it [OK]
Common Mistakes:
  • Using clone instead of remote add
  • Using set-url without adding remote first
  • Confusing fetch with push

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes