How to use Azure DevOps Git Repos for the first time?
Some years back I started playing with "Git", the distributed version control system , when there was no integration in Visual Studio whatsoever.
Today, Microsoft offers TFVC (Team Foundation Version Control) and TFGit as first class citizens in Team Foundation Server or Azure DevOps.
I usually tell developers on teams I help Setup development environments that it is really a matter of preference in certain circumstances.
Now, if your team members are geographically dispersed and you want them to access source code over the internet, you are going to have to use Git or some other distributed source control systems.
But if all your team members are all in the same campus network or can remotely access the Team foundation server, then, it is really a matter of preference (Read Git(TFGit) vs TFVC).
Azure DevOps that was recently launched to replace Visual Studio Team Services, will almost force you to go with the Microsoft implementation of Git (especially if you need to setup public repos).
The steps I am giving below assume that you don't have any IDE integration (or even if you do, the command line option will only make your overall experience more pleasant).
Over the past days, I decided to launch a small but useful intellectual exercise:
Setup a team project in Azure DevOps, Simulate a Scrum agile process, use git for my repos. The project is simply to track all my study session, practice code and tests in preparation for Exam70-487.
I created a sample ASP.NET MVC application in Visual Studio 2017 and pushed my initial code to my Exam70487 repos found here:
The first thing after the project is created is to open it in Azure DevOps and click "Clone"
That's it for the Azure DevOps side.
Now, back in your local development machine:
Make sure you install Git for Windows on your computer if not already done:
Download it at https://git-scm.com/downloads
You can safely just pick the default option.
Once you are done, just navigate to the folder where your code is and do this:
Right click anywhere in the folder and select "Git Bash here", you will a window like this:
Type "git init": This will turn your folder into a git-aware workspace or git local repository where you could track your changes
Next, link your local repo to the remote repo in Azure DevOps:
git remote add origin https://rogerwamba.visualstudio.com/Exam70487/_git/Exam70487
Add your files to the local repo:
git add .
Commit your changes to your local repo
git commit -m "Initial Commit"
Configure a global username
$ git config --global user.email "user@someDomain.com"
Push your local changes to the remote repo
git push -u origin --all