Articles → AZURE DEVOPS → Import Github Repository In Azure Devops
Import Github Repository In Azure Devops
Steps
- Go to project settings.
- Go to "GitHub connections".
Click to Enlarge
- A screen will appear on the right side.
- Click on the button "Connect your GitHub account".
Click to Enlarge
- A screen will come where you are authorizing Azure DevOps to access your GitHub account.
Click to Enlarge
- Once you authorize, another screen will come to enter the password.
Click to Enlarge
- Once the user is authenticated, you can see the GitHub repository.
Click to Enlarge
- Click on the "Save" button. Once you click the button, one more screen will come to authorize and install.
Click to Enlarge
- A connection is established.
Click to Enlarge
- Import the repository, click on the "Import repository".
Click to Enlarge
- A docked window will appear on the right side. Enter the GitHub URL and click on the "Import" button.
Click to Enlarge
- The repository will be imported in Azure DevOps.
Click to Enlarge
Perform Operations On Your Local Machine
- Click on the "Clone" button.
Click to Enlarge
- A window will appear to show the repository URL.
Click to Enlarge
- Open the "Git Bash" application.
- Inside the "Git Bash" application, go to the path where you want to clone the repository.
- Use the following 2 commands.
cd c:/temp/repo
git clone https://GSorg21@dev.azure.com/GSorg21/second/_git/myrepo.git
Click to Enlarge
- The files are copied on the local machine.
Click to Enlarge
- Now, create the file "a.txt" and enter text in it.
Click to Enlarge
- Use the following three commands.
cd myrepo
git add .
git commit -m “added a.txt”
Click to Enlarge
- In case you face any issue, you can execute the following commands.
git config --global http.proxy ProxyUrlOrIP.com:8080
git config --global --unset http.proxy
Click to Enlarge
- Perform the git push operation using the following command.
Click to Enlarge
- Changes are pushed to the Azure DevOps repository.
Click to Enlarge