Skip to content

Commit d10f568

Browse files
committed
refactor: move git and extensions inside workspace section
1 parent dadd279 commit d10f568

2 files changed

Lines changed: 63 additions & 63 deletions

File tree

docs/07-git.md renamed to docs/05-Workspace/06-git.md

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import VideoPlayer from '@site/src/components/Video/player';
1010

1111
**Phoenix Code** includes built-in Git support, allowing you to manage version control directly within the editor. Git can be accessed from the toolbar icon or the File menu in the menu bar.
1212

13-
![Git Overview](./images/git-images/git-overview.png "Git Overview")
13+
![Git Overview](../images/git-images/git-overview.png "Git Overview")
1414

1515
> To use Git features inside Phoenix Code, ensure Git is installed on your computer. [Download Git](https://git-scm.com/downloads)
1616
@@ -19,18 +19,18 @@ import VideoPlayer from '@site/src/components/Video/player';
1919

2020
To clone an existing repository in **Phoenix Code**, follow these steps:
2121

22-
1. Click on the `Start Project` button.
22+
1. Click on the `Start Project` button.
2323

24-
![Start Project](./images/git-images/start-project.png "Start Project")
24+
![Start Project](../images/git-images/start-project.png "Start Project")
2525
> This will open the Quick Start project dialog box, which offers various options. [Read more](../quick-start-project) about Quick Start project here.
2626
2727
2. Select `Get from Git`.
2828

29-
![Get from Git](./images/git-images/get-from-git.png "Get from Git")
29+
![Get from Git](../images/git-images/get-from-git.png "Get from Git")
3030

3131
3. Enter the *Git Clone URL* and choose a *location* to save the project.
3232

33-
![Get from Git dialog](./images/git-images/get-from-git-dialog.png "Get from Git dialog")
33+
![Get from Git dialog](../images/git-images/get-from-git-dialog.png "Get from Git dialog")
3434

3535
4. Click `Create Project`. The repository will be cloned to the specified location.
3636

@@ -42,13 +42,13 @@ You can also clone a repository through the menu:
4242
1. Go to `File > Git > Clone`.
4343
2. Enter the repository URL in the dialog that appears.
4444

45-
![Git Clone](./images/git-images/git-clone-dialog.png "Git Clone")
45+
![Git Clone](../images/git-images/git-clone-dialog.png "Git Clone")
4646

4747
#### More Options
4848

4949
In the Clone Repository dialog, clicking on `More Options` expands additional settings for authentication.
5050

51-
![Git Clone More options](./images/git-images/git-clone-more-options.png "Git Clone more options")
51+
![Git Clone More options](../images/git-images/git-clone-more-options.png "Git Clone more options")
5252

5353
**Credentials**: This section allows you to enter your *username* and *password* for repositories that require authentication. Typically, if your credentials are already stored in a credential manager (like SSH keys or a Git credential manager), you don't need to fill in these fields.
5454

@@ -61,38 +61,38 @@ In the Clone Repository dialog, clicking on `More Options` expands additional se
6161

6262
To initialize a Git repository in a project that doesn’t already have one, click on `File > Git > Init`. This will set up Git for your current project. After initialization, the Git icon will appear in the toolbar, indicating that version control is active.
6363

64-
![Git Init](./images/git-images/git-init.png "Git Init")
64+
![Git Init](../images/git-images/git-init.png "Git Init")
6565

6666
> Note: *For projects without an existing Git repository, the Git icon won’t appear by default. To initialize or connect a Git repository, use the File menu to set up Git for your project.*
6767
6868
Once Git is set up, the Git Panel provides a user-friendly interface to manage version control. You can track changes, commit updates, interact with remote repositories, and more—all within the editor.
6969

70-
![Git Panel](./images/git-images/git-panel.png "Git Panel")
70+
![Git Panel](../images/git-images/git-panel.png "Git Panel")
7171

7272

7373

7474
## File status
7575

7676
All files with changes are displayed in the Git panel along with their status, such as *Modified*, *Untracked*, and *Deleted*. For modified files, a Git diff button is available.
7777

78-
![Git diff Icon](./images/git-images/git-diff-icon.png "Git diff icon")
78+
![Git diff Icon](../images/git-images/git-diff-icon.png "Git diff icon")
7979

8080
*Git diff is used to display the changes made to a file — Green lines indicate added content, while red lines show removed content.*
8181
Clicking on the Git diff icon opens up the Git diff dialog page.
8282

83-
![Git diff Dialog](./images/git-images/git-diff-dialog.png "Git diff dialog")
83+
![Git diff Dialog](../images/git-images/git-diff-dialog.png "Git diff dialog")
8484

8585
### Discard changes
8686

8787
For *Modified* and *Deleted* file statuses, a `Discard Changes...` button is shown. Clicking it will reset the changes for *Modified* files and restore *Deleted* files.
8888

8989
For *Untracked* files, a `Delete File...` button is available. Clicking it will delete the file.
9090

91-
![Discard changes or Delete file](./images/git-images/discard-changes.png "Discard changes or Delete file")
91+
![Discard changes or Delete file](../images/git-images/discard-changes.png "Discard changes or Delete file")
9292

9393
You can also discard all changes made to all files at once by clicking the three dots at the top-right and selecting the `Discard all changes since the last commit...` option. This will remove all modifications made since your last commit.
9494

95-
![Discard all changes](./images/git-images/discard-all-changes.png "Discard all the changes made since last commit")
95+
![Discard all changes](../images/git-images/discard-all-changes.png "Discard all the changes made since last commit")
9696

9797

9898

@@ -101,14 +101,14 @@ You can also discard all changes made to all files at once by clicking the three
101101
When viewing a file with multiple Git changes, you can use the Next Change and Previous Change buttons to quickly move between modifications.
102102

103103
* **Next Change**: Moves the cursor to the next change in the file.
104-
![Move to next change](./images/git-images/move-to-next-change.png "Move to next git change")
104+
![Move to next change](../images/git-images/move-to-next-change.png "Move to next git change")
105105

106106
* **Previous Change**: Moves the cursor to the previous change in the file.
107-
![Move to previous change](./images/git-images/move-to-previous-change.png "Move to previous git change")
107+
![Move to previous change](../images/git-images/move-to-previous-change.png "Move to previous git change")
108108

109109
**Visual Reference**
110110

111-
<VideoPlayer
111+
<VideoPlayer
112112
src="https://docs-images.phcode.dev/videos/git-videos/navigation-git-changes.mp4"
113113
/>
114114

@@ -118,28 +118,28 @@ When viewing a file with multiple Git changes, you can use the Next Change and P
118118

119119
The **Refresh Panel** button ensures that the displayed repository information is up to date. While changes are usually updated automatically, this button helps in cases where the interface lags behind, ensuring all modifications are reflected correctly.
120120

121-
![Refresh Panel](./images/git-images/refresh-panel.png "Refresh panel")
121+
![Refresh Panel](../images/git-images/refresh-panel.png "Refresh panel")
122122

123123

124124

125125
## Commit
126126

127-
To stage/unstage the files, click the checkbox icon at the top-left of the Git panel. This will affect all the files in the working tree.
127+
To stage/unstage the files, click the checkbox icon at the top-left of the Git panel. This will affect all the files in the working tree.
128128

129-
![Stage all files](./images/git-images/stage-files.png "Stage all files")
129+
![Stage all files](../images/git-images/stage-files.png "Stage all files")
130130

131131
You can also stage/unstage individual files by selecting or deselecting the checkbox next to each file.
132132

133133
Once you get all your required files to the staging area, click on the `Commit` button.
134134

135-
![Commit the files](./images/git-images/git-commit.png "Commit the files")
136-
135+
![Commit the files](../images/git-images/git-commit.png "Commit the files")
136+
137137
This will open up Git commit dialog box, which will display all the changes made to the files that are to be committed.
138-
You can enter your commit message in the input box provided.
138+
You can enter your commit message in the input box provided.
139139

140-
![Git Commit dialog](./images/git-images/commit-dialog.png "Git commit dialog box")
140+
![Git Commit dialog](../images/git-images/commit-dialog.png "Git commit dialog box")
141141

142-
> The Commit input box also displays the number of characters in the commit message.
142+
> The Commit input box also displays the number of characters in the commit message.
143143
144144
*If your commit message is longer, you can use the `Extended` button at the top-right of the dialog. This expands the input area, making it easier to write detailed commit messages.*
145145

@@ -149,19 +149,19 @@ The commit dialog box also provides options to :-
149149

150150
> The Git commit dialog box also displays code inspection problems, if there are any:
151151
152-
![Commit Code inspection errors](./images/git-images/git-commit-errors.png "Commit code inspection errors")
152+
![Commit Code inspection errors](../images/git-images/git-commit-errors.png "Commit code inspection errors")
153153

154154

155155

156156
## Push
157157

158158
To upload your local commits to the remote repository, use the `Push` option in the Git panel. This ensures your changes are synchronized with the remote repository.
159159

160-
![Git Push](./images/git-images/git-push.png "Git Push")
160+
![Git Push](../images/git-images/git-push.png "Git Push")
161161

162162
When you initiate a push, the **Push to Remote** dialog appears, allowing you to configure push settings.
163163

164-
![Git Push dialog](./images/git-images/push-dialog.png "Git push dialog")
164+
![Git Push dialog](../images/git-images/push-dialog.png "Git push dialog")
165165

166166
### Target Branch
167167

@@ -178,7 +178,7 @@ When you initiate a push, the **Push to Remote** dialog appears, allowing you to
178178

179179
Clicking More Options expands additional push settings, allowing for more control over the push operation.
180180

181-
![Git push more options](./images/git-images/git-push-more-options.png "Git push more options")
181+
![Git push more options](../images/git-images/git-push-more-options.png "Git push more options")
182182

183183
* **Send tags**: If enabled, this option ensures that Git tags are pushed along with commits. If you have created tags locally and want them reflected in the remote repository, enable this option.
184184

@@ -194,19 +194,19 @@ Clicking More Options expands additional push settings, allowing for more contro
194194

195195
To download the latest changes from the remote repository without modifying your local repository, use the `Fetch` option in the Git panel. This will pull the latest changes from the remote repository but does not update your working directory or merge the changes into your local branches.
196196

197-
![Git fetch](./images/git-images/git-fetch.png "Git fetch")
197+
![Git fetch](../images/git-images/git-fetch.png "Git fetch")
198198

199199

200200

201201
## Pull
202202

203203
To download the latest changes from the remote repository to your local machine, use the `Pull` option in the Git panel. This ensures your local repository is up to date with the latest changes from the remote repository.
204204

205-
![Git pull](./images/git-images/git-pull.png "Git pull")
205+
![Git pull](../images/git-images/git-pull.png "Git pull")
206206

207207
When you initiate a pull, the **Pull from Remote** dialog appears, allowing you to configure pull settings.
208208

209-
![Git pull dialog](./images/git-images/git-pull-dialog.png "Git pull dialog")
209+
![Git pull dialog](../images/git-images/git-pull-dialog.png "Git pull dialog")
210210

211211

212212
### Target Branch
@@ -231,24 +231,24 @@ When you initiate a pull, the **Pull from Remote** dialog appears, allowing you
231231

232232
### Show History
233233

234-
![Show History](./images/git-images/show-history.png "Show History")
234+
![Show History](../images/git-images/show-history.png "Show History")
235235
Clicking the **Show History** button displays a complete list of commits made to the entire repository to help you track the changes made to the project over time.
236236

237237
### Show File History
238238

239-
![Show File History](./images/git-images/show-file-history.png "Show File History")
240-
Clicking the **Show File History** button displays the commit history of a specific file, showing all modifications since it was added to the repository.
239+
![Show File History](../images/git-images/show-file-history.png "Show File History")
240+
Clicking the **Show File History** button displays the commit history of a specific file, showing all modifications since it was added to the repository.
241241

242242
### History Viewer
243243

244244
When selecting a specific commit from the history panel, the **History Viewer** appears, displaying all changes made in that commit.
245245

246-
![History Viewer](./images/git-images/history-viewer.png "History viewer")
246+
![History Viewer](../images/git-images/history-viewer.png "History viewer")
247247

248248
* Each modified file is collapsed by default.
249249
* Clicking on a file expands it to show the exact changes.
250250

251-
![History Viewer expanded](./images/git-images/history-viewer-expanded.png "History viewer expanded")
251+
![History Viewer expanded](../images/git-images/history-viewer-expanded.png "History viewer expanded")
252252

253253
* You can expand or collapse all files at once using the Expand All/Collapse All button.
254254

@@ -262,11 +262,11 @@ This lets you inspect changes directly within the editor.
262262

263263
To create a new branch in Git, click on the `main > Create new branch...` button in the sidebar. The name shown (e.g., main) represents your current branch, so if you're on a different branch, it may display another name.
264264

265-
![Git branch](./images/git-images/git-branch.png "Git branch")
265+
![Git branch](../images/git-images/git-branch.png "Git branch")
266266

267267
This will open a dialog box where you can:
268268

269-
![Git new branch dialog](./images/git-images/git-new-branch-dialog.png "Git new branch dialog box")
269+
![Git new branch dialog](../images/git-images/git-new-branch-dialog.png "Git new branch dialog box")
270270
* Select the branch from which the new branch will originate.
271271
* Enter a name for your new branch.
272272

@@ -276,15 +276,15 @@ Once created, it automatically switches to the new branch and you can start work
276276
### Merging a branch
277277

278278
To merge a branch into the current branch, click on the current branch name (e.g., main) in the sidebar. This will open a popup displaying all available branches.
279-
To the right of each branch name, you'll see a merge icon.
279+
To the right of each branch name, you'll see a merge icon.
280280

281-
![Merge branch](./images/git-images/merge-branch.png "Merge branch")
281+
![Merge branch](../images/git-images/merge-branch.png "Merge branch")
282282

283283
Click on this icon for the branch you want to merge.
284284

285285
This will open a merge dialog box with the following options:
286286

287-
![Merge branch dialog](./images/git-images/merge-branch-dialog.png "Merge branch dialog")
287+
![Merge branch dialog](../images/git-images/merge-branch-dialog.png "Merge branch dialog")
288288

289289
* **Target branch**: Displays the branch where the selected branch will be merged.
290290
* **Merge message**: Provides a default message for the merge, which you can edit.
@@ -297,7 +297,7 @@ This will open a merge dialog box with the following options:
297297

298298
To delete a local branch in Git, click on the current branch name (e.g., main) in the sidebar. This will open a dropdown menu displaying the list of all available branches.
299299

300-
![Delete branch](./images/git-images/delete-branch.png "Delete branch")
300+
![Delete branch](../images/git-images/delete-branch.png "Delete branch")
301301

302302
Next, hover over the branch you want to delete and click the cross 'x' icon next to it. This will delete the selected branch.
303303

@@ -307,15 +307,15 @@ Next, hover over the branch you want to delete and click the cross 'x' icon next
307307

308308
### Adding a New Remote
309309

310-
To add a new remote to your Git repository, open the Git panel and click on `origin > Create new remote...`.
310+
To add a new remote to your Git repository, open the Git panel and click on `origin > Create new remote...`.
311311

312-
![Git remote](./images/git-images/git-remote.png "Git remote")
312+
![Git remote](../images/git-images/git-remote.png "Git remote")
313313

314314
The name shown (e.g., origin) represents your current remote, so if you're on a different remote, it may display another name.
315315

316316
This will open a dialog box, prompting you to enter the name of the new remote.
317317

318-
![Git remote name](./images/git-images/git-remote-name.png "Git remote name")
318+
![Git remote name](../images/git-images/git-remote-name.png "Git remote name")
319319
After that a new dialog box will appear, prompting you to enter the URL of the new remote.
320320
Enter the URL and click `OK`.
321321

@@ -327,7 +327,7 @@ To delete a remote from your Git repository, click on the current remote name in
327327

328328
Next, hover over the remote you want to delete and click the cross 'x' icon next to it. This will remove the selected remote from your repository.
329329

330-
![Git delete remote](./images/git-images/git-delete-remote.png "Git delete remote")
330+
![Git delete remote](../images/git-images/git-delete-remote.png "Git delete remote")
331331

332332
> Note: Deleting the 'origin' remote is not possible.
333333
@@ -343,28 +343,28 @@ Select the remote you want to switch to, and Git will use that remote for operat
343343

344344
The Git Menu provides various Git-related actions to manage version control within the application. To access this menu, navigate to `File > Git`.
345345

346-
![Git Menu](./images/git-images/git-menu.png "Git menu")
346+
![Git Menu](../images/git-images/git-menu.png "Git menu")
347347

348348
Alternatively, you can also access the Git menu by clicking the three dots in the top right corner of the Git panel.
349349

350-
![Git Menu from panel](./images/git-images/git-menu-from-panel.png "Git menu from panel")
350+
![Git Menu from panel](../images/git-images/git-menu-from-panel.png "Git menu from panel")
351351

352-
Here are the available options in Git panel:
352+
Here are the available options in Git panel:
353353

354354
### General options
355355
* **Show Git Panel**: Toggles the visibility of the Git panel in the interface.
356-
* **Refresh Git**: Updates the Git panel to reflect the latest changes in the repository.
356+
* **Refresh Git**: Updates the Git panel to reflect the latest changes in the repository.
357357
[Read more](#refresh-panel) about refresh git.
358358

359359
### Navigation options
360360
* **Go to Next Git Change**: Moves the cursor to the next Git-tracked change in the file.
361-
* **Go to Previous Git Change**: Moves the cursor to the previous Git-tracked change in the file.
361+
* **Go to Previous Git Change**: Moves the cursor to the previous Git-tracked change in the file.
362362
[Read more](#navigate-git-changes) about navigation options.
363363
* **Close Unmodified Files**: Closes all open files that have no uncommitted changes.
364364

365365
### Version history
366366
* **View Authors of Selection...**: Displays the Git history of a selected portion of code, showing who made changes and when.
367-
![View Authors](./images/git-images/view-authors.png "View authors")
367+
![View Authors](../images/git-images/view-authors.png "View authors")
368368
* **View Authors of File...**: Shows the commit history and contributors for the entire file.
369369

370370
### Committing Changes
@@ -390,17 +390,17 @@ Here are the available options in Git panel:
390390

391391
## Git Settings
392392

393-
The Git Settings dialog provides options to configure Git behavior within the application. To open the Git Settings dialog, go to `File > Git > Git Settings...`.
393+
The Git Settings dialog provides options to configure Git behavior within the application. To open the Git Settings dialog, go to `File > Git > Git Settings...`.
394394

395-
![Git Settings from File menu](./images/git-images/git-settings-from-file-menu.png "Git settings from file menu")
395+
![Git Settings from File menu](../images/git-images/git-settings-from-file-menu.png "Git settings from file menu")
396396

397397
Alternatively, you can access it from the Git panel by clicking the three dots in the top right corner and selecting `Git Settings...`.
398398

399-
![Git Settings from Panel](./images/git-images/git-settings-from-panel.png "Git settings from panel")
399+
![Git Settings from Panel](../images/git-images/git-settings-from-panel.png "Git settings from panel")
400400

401401
### General Settings
402402

403-
![Git Settings Dialog](./images/git-images/git-settings-dialog.png "Git Settings Dialog")
403+
![Git Settings Dialog](../images/git-images/git-settings-dialog.png "Git Settings Dialog")
404404

405405
> Settings with an info icon require an application restart to take effect.
406406
@@ -432,7 +432,7 @@ The Git icon does not appear in the toolbar if the project you opened is not a G
432432

433433
If you see a "Pushing to remote failed" error, it means there are new changes in the remote repository that you haven't pulled yet.
434434

435-
![Git push error](./images/git-images/git-push-error.png "Git push error")
435+
![Git push error](../images/git-images/git-push-error.png "Git push error")
436436

437437
**How to Fix:**
438438
Before pushing your changes, pull the latest updates from the remote repository. [Learn how to pull changes](#pull).

0 commit comments

Comments
 (0)