Sunday, November 10, 2019

How to clone Azure DevOps Git Repo using Git Command Line(GitBash)

In this blog, I am going tell how to clone the git repos in Azure Devops to your local machine using the command line GitBash. For this as prerequisite you need to install git bash from https://git-scm.com/downloads















Once you install open the git bash:



 Now change the working folder/path to which you want to clone the repo:













Once you change the path, open Azure Devops repo. Here my repo name is: "DemoClone"











On the left side click on "clone" and copy the clone link:




















Now paste the clone link in git bash using the command: "Git clone". Once you enter you may be asked for either PAT: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page
or login id and password.
Once completed you will get the message as shown below:















Clone is completed...Now you can work with the cloned files!!!

Now open the the folder and we will able to see that a new folder with repo name will be created over there:








Navigate inside to see the files inside the repo:








Now in the git bash change the path to inside the folder being created  while cloning - "DemoClone"













To see the history enter command: Git log













Now you are done!!
























No comments:

Post a Comment