exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 5 question 26 discussion

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

DRAG DROP
-

You have the repositories shown in the following table.



You need to migrate the contents of the GitHub repository to the Azure Repos repository. The solution must ensure that the Azure Repos repository only contains branches and history from the GitHub repository.

Which three commands should you run in sequence? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.

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
memoor
Highly Voted 1 year, 10 months ago
Given Answer correct.....https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops
upvoted 19 times
NPE_
9 months, 3 weeks ago
Given Answer is wrong. Just on the page from your link. It clearly writes "git clone --bare https://github.com/contoso/old-contoso-repo.git cd old-contoso-repo.git" Since you used --bare, this would create a folder that ends with .git. So you should use cd project.git command to go to the code
upvoted 1 times
...
NPE_
9 months, 3 weeks ago
My bad. Given answer is correct. Ignore my last answer...
upvoted 2 times
...
petitbilly
1 year, 9 months ago
More specific link: https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#manually-import-a-repo-using-git-cli
upvoted 3 times
...
...
zellck
Highly Voted 1 year, 5 months ago
1. git clone --bare https://github.com/contoso/project1.git 2. cd project1.git 3. git push --mirror https://dev.azure.com/contoso/project1/_git/proj https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#manually-import-a-repo-using-git-cli
upvoted 14 times
...
yana_b
Most Recent 1 year, 2 months ago
https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops#manually-import-a-repo-using-git-cli In this link the solution is clearly described step by step. Provided answer is correct.
upvoted 2 times
...
RonZhong
1 year, 7 months ago
Given answer is correct: > git clone --bare https://github.com/contoso/old-contoso-repo.git > cd old-contoso-repo.git > git push --mirror https://dev.azure.com/contoso-ltd/MyFirstProject/_git/new-contoso-repo
upvoted 2 times
...
mohiniu
1 year, 8 months ago
Given answer is correct With git clone --bare , directory name has suffix .git.
upvoted 3 times
...
darko13
1 year, 9 months ago
cd project1.git "When cloning using the bare option, the folder name includes the .git suffix." https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?view=azure-devops
upvoted 5 times
...
318touring
1 year, 9 months ago
clone .... project1.git cd project1 mirror .... project1.git
upvoted 1 times
Mattt
5 months, 3 weeks ago
.git is part of the project name For step 2 "cd project1.git" is correct. The given answer is correct.
upvoted 1 times
...
...
GedeonTheOne
1 year, 9 months ago
Git clone --bare https://github.com/contoso/project1.git Cd project1 Git push --mirror https://dev.azure.com/contoso/project1/_git/project1
upvoted 3 times
...
ShivaUdari
1 year, 9 months ago
GitHub repo name is misspelled.
upvoted 6 times
...
mrg998
1 year, 9 months ago
Git clone --bare https://github.com/contoso/project1.git Cd project1.git Git push --mirror https://dev.azure.com/contoso/project1/_git/project1
upvoted 3 times
kai_luni
1 year, 9 months ago
this is certainly not correct, cd project1.git does not work, as 'project1.git' is not a directory
upvoted 3 times
buzzerboy
1 year, 9 months ago
agree, when u clone https://xxxx/yyyyy.git, it creates a folder named yyyy, not yyyyyy.git. Remaining solution is correct. 1. clone from github --bare 2. cd project1 3. push to ado --mirror
upvoted 1 times
resonant
1 year, 3 months ago
It depends on how you clone. With the --bare option, the folder that git creates in the current directory will have the .git suffix. If you didn't pass the --bare option then the folder will be project1 without the .git suffix.
upvoted 1 times
...
warchoon
1 year, 9 months ago
So microsoft is wrong on their learning page. Really sad. What's the answer then?
upvoted 1 times
resonant
1 year, 3 months ago
@mohiniu clarified this already. A normal git clone creates a directory without the .git suffix. A clone with the --bare option passed created a directory with the .git suffix. Just try it yourself.
upvoted 1 times
...
...
...
resonant
1 year, 3 months ago
If the project1 folder does not have a .git suffix, then you didn't pass the --bare option to the clone command.
upvoted 1 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