Skip to content

Commit deb47db

Browse files
author
3836425+corob-msft@users.noreply.github.com
committed
C++ tutorial landing page, attempt 2
1 parent 153f7ed commit deb47db

File tree

6 files changed

+132
-33
lines changed

6 files changed

+132
-33
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
ms.date: 12/06/2021
3+
ms.custom: vs-get-started
4+
ms.topic: include
5+
---
6+
::: moniker range=">=msvc-160"
7+
8+
## Add Git source control
9+
10+
Now that you've created an app, you might want to add it to a Git repository. We've got you covered. Visual Studio makes that process easy with Git tools you can use directly from the IDE.
11+
12+
> [!TIP]
13+
> Git is the most widely used modern version control system, so whether you're a professional developer or you're learning how to code, Git can be very useful. If you're new to Git, the [https://git-scm.com/](https://git-scm.com/) website is a good place to start. There, you can find cheat sheets, a popular online book, and Git Basics videos.
14+
15+
To associate your code with Git, you start by creating a new Git repository where your code is located. Here's how:
16+
17+
1. In the status bar at the bottom-right corner of Visual Studio, select **Add to Source Control**, and then select **Git**.
18+
19+
:::image type="content" source="../media/vs-2022/git-add-source-control.png" alt-text="Screenshot of the Git source control buttons below the Solution Explorer pane, with the Add to Source Control button highlighted.":::
20+
21+
1. In the **Create a Git repository** dialog box, sign in to GitHub.
22+
23+
:::image type="content" source="../media/vs-2022/git-create-repo.png" alt-text="Screenshot of the Create a Git Repository dialog window where you can sign in to GitHub.":::
24+
25+
The repository name auto-populates based on your folder location. By default, your new repository is private, which means you're the only one who can access it.
26+
27+
> [!TIP]
28+
> Whether your repository is public or private, it's best to have a remote backup of your code stored securely on GitHub. Even if you aren't working with a team, a remote repository makes your code available to you from any computer.
29+
30+
1. Select **Create and Push**.
31+
32+
After you create your repository, you see status details in the status bar.
33+
34+
:::image type="content" source="../media/vs-2022/git-new-private-repo-status-details.png" alt-text="Screenshot of the repo status bar that's below the Solution Explorer pane in Visual Studio.":::
35+
36+
The first icon with the arrows shows how many outgoing/incoming commits are in your current branch. You can use this icon to pull any incoming commits or push any outgoing commits. You can also choose to view these commits first. To do so, select the icon, and then select **View Outgoing/Incoming**.
37+
38+
The second icon with the pencil shows the number of uncommitted changes to your code. You can select this icon to view those changes in the **Git Changes** window.
39+
40+
To learn more about how to use Git with your app, see the [Visual Studio version control documentation](/visualstudio/version-control/).
41+
42+
::: moniker-end

docs/get-started/index.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
### YamlMime:Landing
2+
3+
title: Visual Studio tutorials | C++
4+
summary: Create C++ apps with Visual Studio.
5+
6+
metadata:
7+
title: C++ development with Visual Studio
8+
description: Create C++ apps by using Visual Studio.
9+
ms.custom: vs-acquisition
10+
ms.topic: landing-page
11+
ms.date: 12/06/2021
12+
author: corob-msft
13+
ms.author: corob
14+
manager: markl
15+
ms.prod: visual-cpp
16+
ms.technology: vs-acquisition
17+
dev_langs:
18+
- C++
19+
20+
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | whats-new
21+
22+
landingContent:
23+
# Card
24+
- title: Get started
25+
linkLists:
26+
- linkListType: how-to-guide
27+
links:
28+
- text: Install C++ support in Visual Studio
29+
url: ../build/vscpp-step-0-installation.md
30+
- linkListType: get-started
31+
links:
32+
- text: Start a guided tour of Visual Studio
33+
url: /visualstudio/get-started/visual-studio-ide
34+
- linkListType: quickstart
35+
links:
36+
- text: Create a "Hello World" console app
37+
url: ../build/vscpp-step-1-create.md
38+
- text: Build and run your "Hello World" console app
39+
url: ../build/vscpp-step-2-build.md
40+
- linkListType: tutorial
41+
links:
42+
- text: Learn about the Modern C++ language
43+
url: ../cpp/welcome-back-to-cpp-modern-cpp.md
44+
45+
# Card
46+
- title: Create C and C++ apps in Visual Studio
47+
linkLists:
48+
- linkListType: tutorial
49+
links:
50+
- text: Create a console app
51+
url: tutorial-console-cpp.md
52+
- text: Create a Universal Windows Platform app
53+
url: /windows/uwp/cpp-and-winrt-apis/get-started
54+
- text: Create a Windows Desktop app
55+
url: /windows/desktop/learnwin32/learn-to-program-for-windows
56+
- text: Create a Windows Desktop app with MFC
57+
url: ../mfc/reference/creating-an-mfc-application.md
58+
- text: Create a Windows DLL
59+
url: ../build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md
60+
- text: Create a static library
61+
url: ../build/walkthrough-creating-and-using-a-static-library-cpp.md
62+
- text: Create a .NET component
63+
url: ../dotnet/walkthrough-compiling-a-cpp-program-that-targets-the-clr-in-visual-studio.md
64+
- text: Create a DirectX game
65+
url: /windows/uwp/gaming/tutorial--create-your-first-uwp-directx-game
66+
67+
# Card
68+
- title: Learn Visual Studio
69+
linkLists:
70+
- linkListType: tutorial
71+
links:
72+
- text: Open code from a repo
73+
url: /visualstudio/get-started/tutorial-open-project-from-repo.md
74+
- text: Write and edit code
75+
url: /visualstudio/get-started/tutorial-editor.md
76+
- text: Compile and build
77+
url: /visualstudio/ide/compiling-and-building-in-visual-studio.md
78+
- text: Debug your C++ code
79+
url: /visualstudio/debugger/quickstart-debug-with-cplusplus
80+
- text: Test your C++ code
81+
url: /visualstudio/test/writing-unit-tests-for-c-cpp
82+
- text: Compile C++ on the command line
83+
url: ../build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md
84+
- text: Compile C on the command line
85+
url: ../build/walkthrough-compile-a-c-program-on-the-command-line.md
86+
- text: Compile C++/CX on the command line
87+
url: ../build/walkthrough-compiling-a-cpp-cx-program-on-the-command-line.md
88+
- text: Compile C++/CLI on the command line
89+
url: ../build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md
20.6 KB
Loading
97.6 KB
Loading
20.6 KB
Loading

docs/get-started/tutorial-console-cpp.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -369,39 +369,7 @@ Let's handle division by zero more gracefully, so a user can understand the prob
369369

370370
- If it's still running, close the console window for the calculator app.
371371

372-
## Add Git source control
373-
374-
Now that you've created an app, you might want to add it to a Git repository. We've got you covered. Visual Studio makes that process easy with Git tools you can use directly from the IDE.
375-
376-
> [!TIP]
377-
> Git is the most widely used modern version control system, so whether you're a professional developer or you're learning how to code, Git can be very useful. If you're new to Git, the [https://git-scm.com/](https://git-scm.com/) website is a good place to start. There, you can find cheat sheets, a popular online book, and Git Basics videos.
378-
379-
To associate your code with Git, you start by creating a new Git repository where your code is located. Here's how:
380-
381-
1. In the status bar at the bottom-right corner of Visual Studio, select **Add to Source Control**, and then select **Git**.
382-
383-
:::image type="content" source="media/git-add-source-control.png" alt-text="Screenshot of the Git source control buttons below the Solution Explorer pane, with the Add to Source Control button highlighted.":::
384-
385-
1. In the **Create a Git repository** dialog box, sign in to GitHub.
386-
387-
:::image type="content" source="media/git-create-repo-cpp.png" alt-text="Screenshot of the Create a Git Repository dialog window where you can sign in to GitHub.":::
388-
389-
The repository name auto-populates based on your folder location. By default, your new repository is private, which means you're the only one who can access it.
390-
391-
> [!TIP]
392-
> Whether your repository is public or private, it's best to have a remote backup of your code stored securely on GitHub. Even if you aren't working with a team, a remote repository makes your code available to you from any computer.
393-
394-
1. Select **Create and Push**.
395-
396-
After you create your repository, you see status details in the status bar.
397-
398-
:::image type="content" source="media/git-new-private-repo-status-details-cpp.png" alt-text="Screenshot of the repo status bar that's below the Solution Explorer pane in Visual Studio.":::
399-
400-
The first icon with the arrows shows how many outgoing/incoming commits are in your current branch. You can use this icon to pull any incoming commits or push any outgoing commits. You can also choose to view these commits first. To do so, select the icon, and then select **View Outgoing/Incoming**.
401-
402-
The second icon with the pencil shows the number of uncommitted changes to your code. You can select this icon to view those changes in the **Git Changes** window.
403-
404-
To learn more about how to use Git with your app, see the [Visual Studio version control documentation](/visualstudio/version-control/index).
372+
[!INCLUDE[includes/git-source-control.md](includes/git-source-control.md)]
405373

406374
## The finished app
407375

0 commit comments

Comments
 (0)