Getting Git Commits with the VSO REST API

​​​​​​​​With Visual Studio Online now supporting Git, ​​​​more developers are changing their source control repositories. What happens if an application you developed relies on the TFS Client Object Model to get information out of source control (e.g. changeset comments) and the developers start using Git?​

That's where the new Visual Studio Online REST APIs come in. You can get a list of commits from your VSO Git repository with only a HTTP request.​ Let’s look at how to do this with C# and Visual Studio 2013. The below example gets all the commits for a particular user.