exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 5 question 36 discussion

Actual exam question from Microsoft's AZ-400
Question #: 36
Topic #: 5
[All AZ-400 Questions]

DRAG DROP
-

You have a GitHub repository named repo1.

You migrate repo1 to an Azure Repos repository named repo2.

After the migration, changes are made to repo1.

You need to sync the changes to repo2.

How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
KumaTed
Highly Voted 1 year, 10 months ago
has checked on github, should be 1. repo2_clone_url 2. repo2_directory 3. repo1_clone_url 1. clone the empty repo (repo2) into local 2. enter into the folder (repo2) 3. add one more remote repo "upstream" (repo1) 4. fetch the latest code from the remote repo "upstream" (repo1) 5. push the code to the remote repo "origin" (repo2)
upvoted 30 times
tomhansen
1 year, 9 months ago
repo2_directory? that's not one of the options
upvoted 3 times
...
dgcc97
1 year, 10 months ago
Correct, according to https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#can-i-import-updates-if-the-source-changes-later
upvoted 1 times
dgcc97
1 year, 10 months ago
Correction, the 3 should be the repo1_repo_url
upvoted 9 times
...
...
gabo
1 year, 7 months ago
3. repo1 repo URL
upvoted 5 times
...
djhyfdgjk
1 year, 3 months ago
Why 'repo2 clone url' and not 'repo2 repo url' ?? Did you make a clone of repo2 ??
upvoted 2 times
...
...
renzoku
Highly Voted 1 year, 8 months ago
1. repo2 clone url 2. repo2 3. repo1 repo URL https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#can-i-import-updates-if-the-source-changes-later
upvoted 29 times
Tuki93
1 year, 2 months ago
git clone --bare <Azure-Repos-clone-URL>.git cd <name-of-repo> git remote add --mirror=fetch upstream <original-repo-URL> git fetch upstream --tags git push origin --all
upvoted 3 times
...
Gabsyfire
1 year, 3 months ago
very correct
upvoted 1 times
...
...
Gooldmember
Most Recent 5 months, 3 weeks ago
1. repo2 clone url 2. repo2 3. repo1 repo URL
upvoted 2 times
...
sondrex
9 months, 1 week ago
git clone --bare repo1 clone URL cd repo1 git remote add --mirror=fetch upstream repo1 repo URL git fetch upstream --tags git push origin --all repo2 repo URL My answer repo1 clone URL cd repo1 repo1 repo URL
upvoted 2 times
sondrex
9 months, 1 week ago
no my answer wrong must be git clone repo2 clone URL cd repo2 git remote add upstream repo1 clone URL git fetch upstream --tags git push origin --all
upvoted 2 times
...
...
jraillard
1 year, 1 month ago
As it is repo1 you want to sync into repo2 (as repo2 is a migration from repo1), it should be : - git clone --bare <url-to-repo1> repo1 (and here the question is missing adding a suffixing as a good practice such as ".git" or "-bare") - cd repo1 (+suffix) - git remote add --mirror=fetch upstream <url-to-repo2> -
upvoted 4 times
...
ozbonny
1 year, 2 months ago
git clone --bare <Azure-Repos-clone-URL>.git cd <name-of-repo> git remote add --mirror=fetch upstream <original-repo-URL> git fetch upstream --tags git push origin --all
upvoted 1 times
...
hanzocodes
1 year, 4 months ago
repo2 clone url cd repo 2 repo1 clone url 2Clone CD2 in 1Class git clone --bare <Azure-Repos-clone-URL>.git cd <name-of-repo> git remote add --mirror=fetch upstream <original-repo-URL> git fetch upstream --tags git push origin --all https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#can-i-import-updates-if-the-source-changes-later
upvoted 2 times
...
varinder82
1 year, 5 months ago
Final answer after going through all the comments 1. repo2 clone url 2. repo2 3. repo1 repo URL
upvoted 5 times
...
flafernan
1 year, 8 months ago
# Clone the repo1 GitHub repository as a simple repository git clone --bare https://github.com/usuario/repo1.git # Access the cloned repository directory cd repo1.git # Add repo2 repository as a remote named "upstream" and set mirroring to fetch git remote add --mirror=fetch upstream https://dev.azure.com/organization/project/_git/repo2 # Get updates from repo2 repository including tags git fetch upstream --tags # Push all references to repo2 repository in Azure Repos git push origin --all
upvoted 4 times
...
flafernan
1 year, 8 months ago
# Clonar o repositório repo1 do GitHub como um repositório bare git clone --bare https://github.com/usuario/repo1.git # Acessar o diretório do repositório clonado cd repo1.git # Adicionar o repositório repo2 como um remote chamado "upstream" e definir o espelhamento para fetch git remote add --mirror=fetch upstream https://dev.azure.com/organization/project/_git/repo2 # Obter as atualizações do repositório repo2, incluindo as tags git fetch upstream --tags # Empurrar todas as referências para o repositório repo2 no Azure Repos git push origin --all
upvoted 1 times
...
resonant
1 year, 9 months ago
What is the difference between "repo1 repo url" and "repo1 clone url"?
upvoted 5 times
...
sk4shi
1 year, 10 months ago
The provided answer is correct. It is the same question as Topic 5 question 26. See here for reference: https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops
upvoted 2 times
...
kay000001
1 year, 10 months ago
git clone --bare <repo1_clone_url> cd <repo1_directory> git remote add --mirror=fetch upstream <repo1_repo_url> git fetch upstream --tags git push --mirror <repo2_repo_url> Please correct me if I am wrong.
upvoted 6 times
Dats1987
1 year, 5 months ago
wrong. This is the correct sequence from ms documentation. https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#can-i-import-updates-if-the-source-changes-late git clone --bare <Azure-Repos-clone-URL>.git cd <name-of-repo> git remote add --mirror=fetch upstream <original-repo-URL> git fetch upstream --tags git push origin --all
upvoted 1 times
...
...
[Removed]
1 year, 11 months ago
Shouldn't it be: 1. repo1 Clone URl 2. repo1 3. repo2 Repo URL ?
upvoted 3 times
[Removed]
1 year, 10 months ago
This comment is wrong. After further exploring, I believe KumaTed is right. 1. repo2_clone_url 2. repo2_directory 3. repo1_clone_url
upvoted 6 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago