Recover the deleted VSTS Git Repository

This might be not as uncommon as deleting the VSTS account, but this is critically important to the end users. Up until now, there was no way to recover the deleted VSTS git repository. However, with the launch of new version of API,  there is now a way to recover them and keep our jobs for another day.

However, this functionality is not yet available for GUI lovers and for now, available at API level only.  In this blog post, we’ll learn how to restore a deleted git repository by using REST APIs inside postman tool. However, you can use any REST client for this purpose.  Continue reading “Recover the deleted VSTS Git Repository”

Recover the deleted VSTS account

This is one of the rare occurrence but one may come across this scenario. Once a VSTS account is deleted, Microsoft keeps it for 30 days (although in a deactivated state). So it is possible to recover the deleted account during those 30 days.

In this blog post, we’ll learn the steps required to restore a deleted VSTS account.  For this post’s purpose, I’ll delete my personal VSTS account i.e. mohitgoyal.visualstudio.com. Only a VSTS admin can delete the VSTS account. Since I am the owner of the account, so I have this privilege.

In the handsight, we’ll also know how to delete the VSTS account 😉

Delete the VSTS account

To delete the account, we need to go to account settings -> settings Continue reading “Recover the deleted VSTS account”

Set one reviewer as required out of a group for code review in VSTS

Code review or Peer code review is a well known practice in software development, where code written by one programmer is reviewed thoroughly by his peers. In some cases, it is reviewed by one’s seniors as well. When done correctly, peer reviews save time, streamlining the development process upfront and drastically reducing the amount of work required later of Quality Assurance teams. Reviews can also save money, particularly by catching the types of bugs that might slip undetected through testing, through production, and into the end-users.

When your source code repository is hosted in the VSTS or Visual Studio Team Services, you can choose to made the peer review mandatory by using build policies and also enforce use of pull requests:
Continue reading “Set one reviewer as required out of a group for code review in VSTS”

Working with Git and Visual Studio – Use Git Rebase inside Visual Studio

This blog post is part of in-depth blog series on the working with Git command line and Git in Visual Studio. You can find the previous blog post here. In previous blog post, we discussed how to use git rebase commands, the effects of same on the branching strategy and also rebasing on the same branch. In this post, we’ll discuss how to use git rebase inside Visual Studio.

Re-creating Problem Scenario

For starters, we have two branches named master and newQuickFix branch in Continue reading “Working with Git and Visual Studio – Use Git Rebase inside Visual Studio”

Protect source code and use code policies in VSTS

As part of best practices, your source code should always in working state so that it can be readily made available in case of the disaster. The easiest way of maintaining this is by making use of various branches for source code modification and merging only valid source code changes in the master branch. Also build and release process is often set on the master branch so that you can always deploy release from working source code. So it becomes further important to protect your master branch from unwanted changes. In this blog post, we’ll discuss how to protect master branch from unwanted changes in VSTS by making use of both permissions and code policies.

Making use of Permissions to adjust Security

A project can have multiple source code repositories for different parts of the project. Continue reading “Protect source code and use code policies in VSTS”

Working with Git and Visual Studio – Merging Changes using Visual Studio

This post is part of the series of posts on the Git and Visual Studio where we are discussing in detail on meaning of basic git operations, how to do them in Git and Visual Studio both and understand the difference of both tools. You can find the previous blog post here.

In previous blog post, we discussed what is Git Merge, types of Merging and how to achieve the same using git native commands. In this blog post, we’ll learn how to do the same by using Visual Studio.

Fast-forward Merge / Simple Merge

First, let’s reset everything back to commit before merge by using git reset –hard so that we can now compare the results how we did in previous post vs using visual studio. Continue reading “Working with Git and Visual Studio – Merging Changes using Visual Studio”

Working with Git and Visual Studio – Understand Git Merging and Merging changes

This post is part of the series of posts on the Git and Visual Studio where we are discussing in detail on meaning of basic git operations, how to do them in Git and Visual Studio both and understand the difference of both tools. You can find the previous blog post here.

In this blog post, we’ll learn what is merging, types of merge and how to do the same from git command line.

What is Git Merge

Git merging is way of combining the commits made in separate git branches. It is used by git pull command as well to incorporate committed changes from one branch to another branch.  Continue reading “Working with Git and Visual Studio – Understand Git Merging and Merging changes”