How To: Git Using VSTS

  • March 21, 2017

    Introduction

    Just like TFVC (Team Foundation Version Control), Git is another Source Version Control and it’s becoming very popular. VSTS (Visual Studio Team Services) supports both TFVC and Git. Let’s assume that you have no project or Repository and wants to begin with Git on VSTS.

    Step 1: Create a New Project

    Login to your VSTS account, click on New Project

    And fill the information.

    Click “Create” and you will notice that Project will be Created as shown below.

    Step 2: Clone it in IDE

    Click “Clone in Visual Studio”. New Visual Studio IDE will start a dialog like shown below will popup.

    Provide the Repository path and click on “Clone”.

    Switch to Team explorer and Click on “Create a new project or solution”

    When prompted choose the project type. After Project is added successfully you will notice that project is added in Solution Explorer and shows (+) in front of various items and also Team Explorer’s Changes tab shows all the items listed as newly being added.

    Step 3: Commit Changes and Publish

    After project being added into Solution Explorer it’s considered as a change to the blank repository/project you created. Hence, this change needs to be added to remote Master branch.

    In Team Explorer Changes, add a comment for check-in and click on “Commit All”

    Click “Commit All” and from the next Synchronization Tab, click “Publish”

    Now your Git Repository in VSTS should be updated with the code you have pushed-in to it. Refresh your VSTS page and you should be able to see your project code added.

    For more information, please do reach out! Keep an eye out for our upcoming articles on Developing Cloud Apps with Azure, TDD Using C# and Unit Testing. Be sure not to miss out, follow us now!

     

    Comments(0)

    Leave a comment

    Required fields are marked *