Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 2.44 KB

share-code-push-commit-changes.md

File metadata and controls

26 lines (17 loc) · 2.44 KB
author ms.author ms.date ms.topic ms.service ms.subservice
vijayma
vijayma
10/18/2022
include
azure-devops-repos
azure-devops-repos-git

As you write your code, your changes are automatically tracked by Visual Studio. When you're satisfied with your changes, you can save them in Git using a commit, and then push your commit to Azure Repos.

  1. In the Git Changes window, enter a message that describes the changes, and then choose Commit All. Commit All commits unstaged changes and skips the staging area. You can choose to stage all files before committing by selecting the stage all + (plus) button at the top of the Changes section of the Git Changes window.

    :::image type="content" source="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/commit-changes.png" border="true" alt-text="Screenshot of the 'Commit All' button in the 'Git Changes' window in Visual Studio." lightbox="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/commit-changes-lrg.png":::

  2. To push your commit to Azure Repos, select the up-arrow push button.

    :::image type="content" source="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-changes-window.png" border="true" alt-text="Screenshot of the up-arrow push button in the 'Git Changes' window of Visual Studio." lightbox="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-changes-window-lrg.png":::

    Or, you can push your commit from the Git Repository window. To open the Git Repository window, select the outgoing / incoming link in the Git Changes window.

    :::image type="content" source="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-repositories-window.png" border="true" alt-text="Screenshot of the 'outgoing / incoming' link in the 'Git Changes' window, and the Push link in the 'Git Repository' window of Visual Studio." lightbox="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-repositories-window-lrg.png":::

    Or, you can choose Git > Push from the menu bar.

    :::image type="content" source="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-menu.png" border="true" alt-text="Screenshot of the Push option from the Git menu in Visual Studio." lightbox="../media/share-your-code-in-git-vs/visual-studio-2019/git-experience/push-commit-git-menu-lrg.png":::