You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sourcecontrol/github.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ The queries used to display pull requests can be configured with the **GitHub Pu
96
96
},
97
97
```
98
98
99
-
### Creating Pull Requests
99
+
### Creating pull requests
100
100
101
101
Once you have committed changes to your fork or branch, you can use the **GitHub Pull Requests: Create Pull Request** command or the **Create Pull Request** button in the **Pull Requests** view to create a pull request.
102
102
@@ -114,6 +114,11 @@ Once you select **Create**, if you have not already pushed your branch to a GitH
114
114
115
115
The **Create Pull Request** view now enters **Review Mode**, where you can review the details of the PR, add comments, and merge the PR once it's ready. After the PR is merged, you'll have the option to delete both the remote and local branch.
116
116
117
+
> [!TIP]
118
+
> Use GitHub Copilot to generate a PR title and description, based on the commits that are included in the PR. Select the _sparkle_ icon next to the PR title field to generate a PR title and description.
119
+
120
+

121
+
117
122
### Reviewing
118
123
119
124
Pull requests can be reviewed from the **Pull Requests** view. You can assign reviewers and labels, add comments, approve, close, and merge all from the pull request **Description**.
@@ -128,6 +133,9 @@ The diff editors from this view use the local file, so file navigation, IntelliS
128
133
129
134
When you are done reviewing the pull request changes you can merge the PR or select **Exit Review Mode** to go back to the previous branch you were working on.
130
135
136
+
> [!TIP]
137
+
> You can also [let Copilot perform a code review of the PR](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review?tool=vscode) before you create it. Select the **Copilot Code Review** button in the GitHub Pull Request view.
138
+
131
139
## Issues
132
140
133
141
### Creating issues
@@ -247,12 +255,6 @@ These changes are deleted from our service once they are applied to your target
247
255
248
256
In the event that your pending changes are not automatically applied to your target development environment, you can view, manage, and delete your stored changes using the **Cloud Changes: Show Cloud Changes** command.
249
257
250
-
## GitHub Copilot
251
-
252
-
In VS Code, you can enhance your coding with artificial intelligence (AI), such as suggestions for lines of code or entire functions, fast documentation creation, and help creating code-related artifacts like tests.
253
-
254
-
[GitHub Copilot](https://copilot.github.com/) is an AI-powered code completion tool that helps you write code faster and smarter. You can use the [GitHub Copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) in VS Code to generate code, or to learn from the code it generates.
255
-
256
-
[](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)
258
+
## Next steps
257
259
258
-
You can learn more about how to get started with Copilot in the [Copilot documentation](/docs/editor/github-copilot.md).
260
+
* Learn more about [Copilot VS Code](/docs/copilot/overview.md) - Learn about Copilot in VS Code.
Copy file name to clipboardExpand all lines: docs/sourcecontrol/intro-to-git.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,11 @@ MetaDescription: Get started with Git in Visual Studio Code and take control of
11
11
12
12
Want to easily manage your source code and collaborate with others? Git and GitHub are the tools you need! And with Visual Studio Code, you can set up and use them in a snap. Even if you're a beginner, VS Code's user-friendly interface guides you through common Git actions like pushing and pulling code, creating and merging branches, and committing code changes. And if you're a pro, you'll love the ability to perform Git actions directly within the editor, saving you time and effort compared to using the Git command line. Plus, the seamless workflow between VS Code and Git means you can stay in your editor and get more done.
13
13
14
+
With GitHub Copilot in VS Code, you can get suggestions for commit messages, pull requests, and review code changes before committing them. Learn more about [GitHub Copilot in VS Code](/docs/copilot/overview.md).
15
+
16
+
> [!TIP]
17
+
> If you don't have a Copilot subscription yet, use Copilot for free by signing up for the [Copilot Free plan](https://github.com/github-copilot/signup). You'll get a monthly limit of completions and chat interactions.
18
+
14
19
## Set up Git in VS Code
15
20
16
21
To use Git and GitHub in VS Code, first make sure you [have Git installed on your computer](https://git-scm.com/downloads). If Git is missing, the **Source Control** view shows instructions on how to install it. Make sure to restart VS Code afterwards.
@@ -95,13 +100,15 @@ VS Code's remote repository support allows you to browse and edit a GitHub repos
95
100
96
101

97
102
98
-
> **Tip:** If you need to execute code or run terminal commands, you can seamlessly switch from a remote repository to a codespace with the command **Continue Working on**.
103
+
> [!TIP]
104
+
> If you need to execute code or run terminal commands, you can seamlessly switch from a remote repository to a codespace with the command **Continue Working on**.
99
105
100
106
## Staging and committing code changes
101
107
102
108
Once you have a Git repository set up, you can start tracking code changes by [staging and committing](https://git-scm.com/about/staging-area) your newly created and edited code.
103
109
104
-
> **Tip**: Commit your changes early and often. This makes it easier to revert back to previous versions of your code if needed.
110
+
> [!TIP]
111
+
> Commit your changes early and often. This makes it easier to revert back to previous versions of your code if needed.
105
112
106
113
You can access the **Source Control** view from the Activity Bar to list all changed files in your workspace. You can toggle between a tree view or list view by using the tree/list icon in the Source Control view header.
107
114
@@ -123,7 +130,8 @@ Staged changes can also be discarded by selecting the **−** (minus) icon next
123
130
124
131
To commit your staged changes, type a commit message in the upper text box, and then select the **Commit** button. This saves your changes to the local Git repository, allowing you to revert to previous versions of your code if needed.
125
132
126
-
> **Tip**: If you have a GitHub Copilot subscription, and installed the Github Copilot extension, you can use the *sparkle* icon to [generate a commit message](/docs/copilot/overview.md#productivity-improvements).
133
+
> [!TIP]
134
+
> With GitHub Copilot in VS Code, you can [generate a commit message](/docs/copilot/overview.md#productivity-improvements) based on your code changes. Learn more about [generating commit messages with AI](/docs/sourcecontrol/overview.md#generate-a-commit-message-with-ai). Before you commit your changes, you can also let Copilot do a [code review of the uncommitted changes](/docs/sourcecontrol/overview.md#review-uncommitted-code-changes-with-ai).
127
135
128
136
You can navigate through and review all local file changes and commits in the **Timeline** view available in the bottom of the Explorer view.
129
137
@@ -135,7 +143,8 @@ Once you have made commits to your local Git repository, you can push them to th
135
143
136
144

137
145
138
-
> **Tip:** You can enable the **Git: Autofetch**[setting](/docs/getstarted/settings.md) to always get an up-to-date remote commit indicator.
146
+
> [!TIP]
147
+
> You can enable the **Git: Autofetch**[setting](/docs/getstarted/settings.md) to always get an up-to-date remote commit indicator.
139
148
140
149
Push and pull can also be performed individually by using their respective commands. You can access these commands from the Source Control menu.
141
150
@@ -153,7 +162,8 @@ To create a new branch, select the branch indicator and choose to create it from
153
162
154
163

155
164
156
-
> **Tip:** If you use the [GitHub Pull Requests and Issues](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension, you can create a branch directly from an issue, which gets you started working in a new local branch and automatically prefills the pull request for you.
165
+
> [!TIP]
166
+
> If you use the [GitHub Pull Requests and Issues](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension, you can create a branch directly from an issue, which gets you started working in a new local branch and automatically prefills the pull request for you.
157
167
158
168
After you create a local branch, you can push the branch to the remote repository by selecting **Publish Branch** in the **Source Control** view. This creates a new branch on the remote repository, allowing you to collaborate with others in that branch.
159
169
@@ -167,7 +177,8 @@ To create a PR, make sure you are on a separate branch from the main branch, and
167
177
168
178

169
179
170
-
To review a PR, select the **Review Pull Request** button in the **Source Control** view, and select the PR you want to review. This opens the PR in a new editor window, where you can review the code changes and leave comments. Once you are satisfied with the code changes, you can select the **Merge** button to merge the PR into the targeted branch.
180
+
> [!TIP]
181
+
> Use GitHub Copilot to generate a PR title and description, based on the commits that are included in the PR. Select the _sparkle_ icon next to the PR title field to generate a PR title and description. You can also [let Copilot perform a code review of the PR]() before you create it. Select the **Copilot Code Review** button in the GitHub Pull Request view.
171
182
172
183
Learn more about pull requests in [VS Code's GitHub documentation](/docs/sourcecontrol/github.md).
0 commit comments