Skip to content

Commit 91e06a4

Browse files
committed
initial draft on editing files on vscode.dev
1 parent 1bd1574 commit 91e06a4

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed

8-code-editor/1-using-a-code-editor/README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,39 @@ https://github.com/microsoft/Web-Dev-For-Beginners
7575

7676
You can also use a url directly to load a repository. For example, the full URL for the current repo is [https://github.com/microsoft/Web-Dev-For-Beginners](https://github.com/microsoft/Web-Dev-For-Beginners), but you can swap the GitHub domain with `VSCode.dev/github` and load the repository directly. The resulting URL would be [https://vscode.dev/github/microsoft/Web-Dev-For-Beginners](https://vscode.dev/github/microsoft/Web-Dev-For-Beginners).
7777

78-
Open a repository on github.com and hit the . button on your keyboard to swap the github.com domain with the vscode.dev domain instantly.
79-
80-
✅ If succesful, you'll see all files for this repository loaded in the text editor.
8178

8279
## Edit files
80+
Once you have opened the repository on the browser/ vscode.dev, the next step would be to make updates or changes to the project.
81+
82+
a) Create a new file
83+
84+
You can either create a file inside an existing folder, or create it in the root directory/folder. To create a new file open a location/directory to which you want the file to be saved and select the _'New file ...'_ icon, give it a name and hit enter.
85+
86+
![Create a new file](../images/create-new-file.png)
87+
88+
b) Edit and save a file on the repository
89+
90+
Using vscode.dev is helpful whenever you want to make quick updates to your project without having to load any software on your computer.
91+
To update your code, click the 'Explorer' icon to view files & folders in the repository.
92+
Select a file to open it on the screen and make your changes.
93+
94+
![Edit a file](../images/edit-a-file.png)
95+
96+
Once you are done updating your project, select the _'source control'_ icon which contains all the new changes you have made to your repository.
97+
98+
To view the changes you made to your project, select the file(s) in the 'Changes' folder. This will open a 'Working Tree' for you to visually see the changes you made to the file. Red shows an ommission to the project, while green signifies an addition.
99+
100+
![View changes](../images/working-tree.png)
101+
102+
If you are safisfied with the changes you made, hover on the 'Changes' folder and click the + button to stage the changes. Staging simply means preparing your changes to commit them to GitHub.
103+
104+
If however you are not comfortable with some changes and you want to discard them, hover on the 'Changes' folder and select the undo icon.
105+
106+
Then, type in a commit message _(A description of the change you have made to the project)_ and commit your changes by clicking the 'tick'.
107+
108+
Once done working on your project, select the hamburger menu icon at the top left to return to the repository on GitHub.
109+
110+
![Stage & commit changes](../images/EditVSCode.dev.gif)
83111

84112
## Using extensions
85113

3.61 MB
Loading
96.6 KB
Loading

8-code-editor/images/edit-a-file.png

89.2 KB
Loading

8-code-editor/images/working-tree.png

149 KB
Loading

0 commit comments

Comments
 (0)