user2492555
user2492555

Reputation: 11

Code review in GIT before commit to VSTS/TFS repo

I am working with the customer to land on TFS/VSTS as DevOps tool where they have opted GIT as their version control and while evaluating the same they have come across a specific ask, i.e. requesting code review before code commit from Visual Studio to GIT repo as similar to request code review in TFVC. Looking forward for any insights/help if it can be achieved using any tools or practices.

Upvotes: 1

Views: 1683

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59018

Git is a different version control system with a drastically different paradigm. There is no direct equivalent to TFVC code reviews for Git. You can't enforce code review prior to commit with Git, because commits in Git occur against the developer's local repo.

There is, however, a superior code review model in the form of Pull Requests combined with Branch Policies.

Pull requests allow developers to request that a change they made on a development branch and pushed to VSTS be merged into a different branch. The commits that are part of the pull request can then be reviewed prior to merging.

Branch policies force (among other things) certain branches to be protected, so that all commits to them must be through pull requests.

Upvotes: 1

Related Questions