#FirstSteps — How to do Git with GitHub or Azure Devops?
This article is for starters in software development or for the experienced ones who want to catch up again with the modern software engineering practices in use these days with the advent of lightweight frameworks and runtime like Node, Express, .Net Core, etc. Again, I will be keeping language very simple.
Why Use Git?
Git is simple yet very powerful version control, it is distributed yet very flexible. It can track changes made on your files and hence can let you know how things have changed in the code, files under its version control. Git works over HTTP and can be used in conjunction with online services like GitHub, Azure Devops, BitBucket and GitLab. We will see how GitHub can be used to stand-up a remote repo in the following sections. Git is supported by a very mature community and has huge number of tool-set for local workstation and online collaboration. It can be used to manage isolated features with branching strategy, helping in reducing risks due to unfinished, unclear features on the software development thereby it fits naturally with agile development methodologies.
Prerequisites before you start
Choosing remote Repo Service of your choice.
You have number of platforms offering online remote repo services, in this article we will mainly discuss the GitHub service. We may list few differences between GitHub and Azure Devops Repos at few places. Please note that most service work in a similar manner but may have slight differences due to offerings differences of each service.
You will need Azure Devops subscriptions available here or GitHub subscription available here. Both the services are offered by Microsoft and you are free to use anyone, both services are free for most of the experiments required.
Apart from version control both the services offer mature Devops services. We will not discuss them in this article to stay focused on the current topic.
GitHub is world’s famous code repository service, sometimes called as home of code and we will lot of innovation and new services will be added to GitHub over next few days. Sweetest part of these services is that both are free for individuals and small organisations. Hence, lets you learn and innovate without thinking about money.
In this article GitHub services will be used as a remote repo(short for repository). This service will enable collaboration between teams spread across offices, work from home locations.
GitHub
Once you have signed into GitHub you can head to create a repo from the home page by clicking ‘New’ button. Example how repo creation appears on GitHub is as following:

- Azure Devops services are slightly different and you first need to sign on to services, create organisation and repos can be created after you have added a project your organisation.
Local Workstation Toolset Setup
You will need:
- Must: VS Code, its a very elegant and lightweight editor from Microsoft and is a current favorite for developers, supported by number of plugins which can be installed directly from plugin’s browser available within VS Code itself.
- Must: Git CLI tool set available here for download.
- Optional: you may want to use Tortoise Git. It offers brilliant repo management on the local workstation.
- Optional: You can also use posh git command set available.
Git Setup

Important Points to notice
In summary you build your code locally, stage it locally, commit it to local git branch on your workstation, when you get fully confident with code quality then the code is push to remote.
Remote branches are meant to be used for collaboration. Code in local repo/branches are exact replica of what you have on remote, if something goes wrong on local workstation, code will not be pushed to remote and other developers in the team will not be blocked. This is the beauty and biggest advantage of Git version control system over centralized version controls like TFVC.
Steps
- Perform Prerequisites steps — install Git CLI
- Create account with any online Git Services.
- Open the command prompt of your choice on your computer like Powershell/Command Shell or Git shell. Following commands usually the same and all online services provides kick start CLI scripts for getting local-remote connection working.

3.Run ‘Git Version”
4. Run ‘Git init’ — on your work station command prompt. This will establish a local git repository.
6. Add some files in the newly created folder.
7. Run ‘Git status’ — this will show you all the files which will be due to be committed to the repo.
8. Run “Git branch -m main”
9. Run “Git remote add origin https://github.com/YourRepoName/RepoName.git”
This step links your local repository to an online git repo service. Without this you will not be able to share code with other developers seamlessly.
10. Git push -u origin main
11. You may be prompted for Git username and password. Provide them on prompt.
12. Once code is uploaded your repo should look something like this:

Advanced Git Concepts:
Git Workflows
Git Workflows is an advanced concept which is used to accomplish complex collaboration within teams to achieve high productivity with Git based repos and it lets you deliver projects with multiple features over the time with big or distributed teams. You can refer this link to understand Git Workflows as explained by Atlassian one of the leading online Git Services provider via BitBucket:
Standard Git References
You can use book available on Git’s official website to enhance your knowledge further, link is provided below: