diff --git a/docs/07-Features/04-git.md b/docs/07-Features/04-git.md index 3038b5c0..5b86a0b7 100644 --- a/docs/07-Features/04-git.md +++ b/docs/07-Features/04-git.md @@ -5,58 +5,45 @@ title: Git import React from 'react'; import VideoPlayer from '@site/src/components/Video/player'; +## Getting Started with Git in Phoenix Code + **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. ![Git Overview](./images/git-images/git-overview.png "Git Overview") > To use Git features inside Phoenix Code, ensure Git is installed on your computer. [Download Git](https://git-scm.com/downloads) -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.* - -The Git Panel in **Phoenix Code** provides a simple interface for managing version control. It allows you to track changes, commit updates, interact with remote repositories and many more without leaving the editor. - -![Git Panel](./images/git-images/git-panel.png "Git Panel") - +### Cloning a Repository -## Initializing a Git repository - -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. - -![Git Init](./images/git-images/git-init.png "Git Init") - - - -## Cloning a Git repository - -You can easily clone an existing project directly within the editor. - -### Suggested Method +To clone an existing repository in **Phoenix Code**, follow these steps: 1. Click on the `Start Project` button. ![Start Project](./images/git-images/start-project.png "Start Project") +> This will open the Quick Start project dialog box, which offers various options. [Read more](../05-quick-start-project.md) about Quick Start project here. -> This will open the Quick Start project dialog box, with various options. [Read more](../05-quick-start-project.md) about Quick Start project here. - -2. Select the `Get from Git` button. +2. Select `Get from Git`. ![Get from Git](./images/git-images/get-from-git.png "Get from Git") -A dialog box will appear asking you to enter the `Git Clone URL` and the `Location` where you want to clone the repository. Fill in the URL of the project and select the location on your machine. +3. Enter the *Git Clone URL* and choose a *location* to save the project. ![Get from Git dialog](./images/git-images/get-from-git-dialog.png "Get from Git dialog") -3. Click on `Create Project`. This will clone the repository to the location you specified. +4. Click `Create Project`. The repository will be cloned to the specified location. -### Alternative Method +### Alternative Cloning Method -Go to `File > Git > Clone`. A dialog will appear, prompting you to enter the URL of the repository you wish to clone. +You can also clone a repository through the menu: + +1. Go to `File > Git > Clone`. +2. Enter the repository URL in the dialog that appears. ![Git Clone](./images/git-images/git-clone-dialog.png "Git Clone") -### More Options +#### More Options In the Clone Repository dialog, clicking on `More Options` expands additional settings for authentication. @@ -69,6 +56,19 @@ In the Clone Repository dialog, clicking on `More Options` expands additional se *If cloning fails due to authentication issues (e.g., timeout errors), you might need to manually provide your credentials.* +### Initializing a Git repository + +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. + +![Git Init](./images/git-images/git-init.png "Git Init") + +> 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.* + +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. + +![Git Panel](./images/git-images/git-panel.png "Git Panel") + + ## File status @@ -238,6 +238,21 @@ Clicking the **Show History** button displays a complete list of commits made to ![Show File History](./images/git-images/show-file-history.png "Show File History") Clicking the **Show File History** button displays the commit history of a specific file, showing all modifications since it was added to the repository. +### History Viewer + +When selecting a specific commit from the history panel, the **History Viewer** appears, displaying all changes made in that commit. + +![History Viewer](./images/git-images/history-viewer.png "History viewer") + +* Each modified file is collapsed by default. +* Clicking on a file expands it to show the exact changes. + +![History Viewer expanded](./images/git-images/history-viewer-expanded.png "History viewer expanded") + +* You can expand or collapse all files at once using the Expand All/Collapse All button. + +This lets you inspect changes directly within the editor. + ## Branch diff --git a/docs/07-Features/images/git-images/get-from-git.png b/docs/07-Features/images/git-images/get-from-git.png index 5d01590f..b79ecde9 100644 Binary files a/docs/07-Features/images/git-images/get-from-git.png and b/docs/07-Features/images/git-images/get-from-git.png differ diff --git a/docs/07-Features/images/git-images/history-viewer-expanded.png b/docs/07-Features/images/git-images/history-viewer-expanded.png new file mode 100644 index 00000000..b8d4fb8f Binary files /dev/null and b/docs/07-Features/images/git-images/history-viewer-expanded.png differ diff --git a/docs/07-Features/images/git-images/history-viewer.png b/docs/07-Features/images/git-images/history-viewer.png new file mode 100644 index 00000000..18a9f9ee Binary files /dev/null and b/docs/07-Features/images/git-images/history-viewer.png differ