Visual Studio is a common tool with dotnet developers. It is an IDE where you can do all your developments without needing any other tool, even database management software. Last week, I saw someone who has Visual Studio use git bash to manage their git repo. I showed them how to use the git tool on the IDE and thought to write something about it.
You can clone an existing repo or start a new project entirely from Visual Studio without having to use any terminal. Everything you need is already in the IDE.
Let us start with cloning an existing repo.
When you open your Visual Studio (version >= 2019), you get this screen.
Let's assume you have a repo you want to clone.
Click on "Clone a repository" and you will get this page
Put the link of the repo you want to clone and click on clone
Voila, you have successfully cloned a repo.
To create a new repo from a new project, follow these steps:
- Create your project
- After your project is created, click on the "Git changes" tab beside the Solution Explorer.
If you cannot find the "Git changes" tab, click the View tab at the top of Visual Studio, you will find "Git changes" there.
- When the Git changes tab come up, click on "Create new repository" and you will get this page
- Fill the form with everything you want and you are good to go. Subsequent changes can be made in the "Git changes" tab.
NB: You must have your git set up before you can do all these. You may get some prompt to set up your git if you have not.
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse