Version control & source control with Git in Visual Studio for Mac

Important

Visual Studio for Mac is scheduled for retirement on August 31, 2024 in accordance with Microsoft’s Modern Lifecycle Policy. While you can continue to work with Visual Studio for Mac, there are several other options for developers on Mac such as the preview version of the new C# Dev Kit extension for VS Code.

Learn more about support timelines and alternatives.

Version control is a system for managing files over many different versions, and - in software development - is generally contributed to by many developers. The principal purpose of any version control system (VCS) is to find a solution that enables all users to work on the codebase at the same time.

At the core of any version control system is a repository, which acts as the central data store for all the different files - similar to a file server. However, unlike a file server, the repository contains the entire history of the project and all revisions that have been made.

If the repository is the central data store, it is logical for each user to have a local store of the data, allowing them to work on it. This is called a working copy. In Visual Studio for Mac your working copy will appear just as any other local directory on your machine, allowing you to read from and write to any of the files.

Visual Studio for Mac includes built-in support for Git repositories. If you're new to Git, the https://git-scm.com/ website is a good place to start. Git is a distributed version control system that allows teams to work on the same documents simultaneously. With Git there might be a single server that contains all the files, but the entire repository is cloned locally to your machine whenever a repository is checked out from this central source.

Basic Concepts

To learn more about the Git tooling in Visual Studio for Mac, the following articles explore setting up Git repositories through Visual Studio for Mac, as well as simple functionality such as reviewing, committing, and pushing changes.

See also