diff --git a/docs/07-Features/04-git.md b/docs/07-Features/04-git.md new file mode 100644 index 00000000..d2a5b9c2 --- /dev/null +++ b/docs/07-Features/04-git.md @@ -0,0 +1,88 @@ +--- +title: Git +--- + +**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") + + +## 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 + +If you want to clone an existing project, you can do so directly within the editor. To clone a repository, go to `File > Git > Clone`. A dialog will appear, prompting you to enter the URL of the repository you wish to clone. + +![Git Clone](./images/git-images/git-clone-dialog.png "Git Clone") + +### More Options + +In the Clone Repository dialog, clicking on `More Options` expands additional settings for authentication. + +![Git Clone More options](./images/git-images/git-clone-more-options.png "Git Clone more options") + +**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. + +**Save Credentials to Remote URL**: If enabled, the provided credentials (username and password) will be stored in plain text within the remote URL. + +*If cloning fails due to authentication issues (e.g., timeout errors), you might need to manually provide your credentials.* + + +## File status + +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. + +![Git diff Icon](./images/git-images/git-diff-icon.png "Git diff icon") + +*Git diff is used to display the changes made to a file — green lines indicate added content, while red lines show removed content.* +Clicking on the Git diff icon opens up the Git diff dialog page. + +![Git diff Dialog](./images/git-images/git-diff-dialog.png "Git diff dialog") + +### Discard changes + +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. + +For *Untracked* files, a `Delete File...` button is available. Clicking it will delete the file. + +![Discard changes or Delete file](./images/git-images/discard-changes.png "Discard changes or Delete file") + + + +## Commit + +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. + +![Stage all files](./images/git-images/stage-files.png "Stage all files") + +You can also stage/unstage individual files by selecting or deselecting the checkbox next to each file. + +Once you get all your required files to the staging area, click on the `Commit` button. + +![Commit the files](./images/git-images/git-commit.png "Commit the files") + +This will open up Git commit dialog box, which will display all the changes made to the files that are to be commited. +You can enter your commit message in the input box provided. + +![Git Commit dialog](./images/git-images/commit-dialog.png "Git commit dialog box") + +> The commit input box also displays the number of characters in the commit message. + +*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.* + +The commit dialog box also provides options to :- +* **Amend Last Commit**: Selecting this option allows you to modify the most recent commit instead of creating a new one. +* **Skip Pre-Commit Checks**: Enabling this option bypasses any pre-commit hooks or validation steps. \ No newline at end of file diff --git a/docs/07-Features/04-keyboard-shortcuts.md b/docs/07-Features/05-keyboard-shortcuts.md similarity index 100% rename from docs/07-Features/04-keyboard-shortcuts.md rename to docs/07-Features/05-keyboard-shortcuts.md diff --git a/docs/07-Features/05-Live Preview/01-live-preview.md b/docs/07-Features/06-Live Preview/01-live-preview.md similarity index 100% rename from docs/07-Features/05-Live Preview/01-live-preview.md rename to docs/07-Features/06-Live Preview/01-live-preview.md diff --git a/docs/07-Features/05-Live Preview/02-live-preview-settings.md b/docs/07-Features/06-Live Preview/02-live-preview-settings.md similarity index 100% rename from docs/07-Features/05-Live Preview/02-live-preview-settings.md rename to docs/07-Features/06-Live Preview/02-live-preview-settings.md diff --git a/docs/07-Features/05-Live Preview/03-php-live-preview.md b/docs/07-Features/06-Live Preview/03-php-live-preview.md similarity index 100% rename from docs/07-Features/05-Live Preview/03-php-live-preview.md rename to docs/07-Features/06-Live Preview/03-php-live-preview.md diff --git a/docs/07-Features/06-Problems Panel/01-html-lint.md b/docs/07-Features/07-Problems Panel/01-html-lint.md similarity index 100% rename from docs/07-Features/06-Problems Panel/01-html-lint.md rename to docs/07-Features/07-Problems Panel/01-html-lint.md diff --git a/docs/07-Features/06-Problems Panel/02-ESLint.md b/docs/07-Features/07-Problems Panel/02-ESLint.md similarity index 100% rename from docs/07-Features/06-Problems Panel/02-ESLint.md rename to docs/07-Features/07-Problems Panel/02-ESLint.md diff --git a/docs/07-Features/07-quick-edit.md b/docs/07-Features/08-quick-edit.md similarity index 100% rename from docs/07-Features/07-quick-edit.md rename to docs/07-Features/08-quick-edit.md diff --git a/docs/07-Features/08-recent-files.md b/docs/07-Features/09-recent-files.md similarity index 100% rename from docs/07-Features/08-recent-files.md rename to docs/07-Features/09-recent-files.md diff --git a/docs/07-Features/09-syntax-highlighting.md b/docs/07-Features/10-syntax-highlighting.md similarity index 100% rename from docs/07-Features/09-syntax-highlighting.md rename to docs/07-Features/10-syntax-highlighting.md diff --git a/docs/07-Features/11-Git.md b/docs/07-Features/11-Git.md deleted file mode 100644 index d9faf5e7..00000000 --- a/docs/07-Features/11-Git.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Git ---- - -Explore Git Features in Phoenix Code - -Coming soon... \ No newline at end of file diff --git a/docs/07-Features/10-themes.md b/docs/07-Features/11-themes.md similarity index 100% rename from docs/07-Features/10-themes.md rename to docs/07-Features/11-themes.md diff --git a/docs/07-Features/images/git-images/commit-dialog.png b/docs/07-Features/images/git-images/commit-dialog.png new file mode 100644 index 00000000..97af7b1b Binary files /dev/null and b/docs/07-Features/images/git-images/commit-dialog.png differ diff --git a/docs/07-Features/images/git-images/discard-changes.png b/docs/07-Features/images/git-images/discard-changes.png new file mode 100644 index 00000000..aceec470 Binary files /dev/null and b/docs/07-Features/images/git-images/discard-changes.png differ diff --git a/docs/07-Features/images/git-images/git-clone-dialog.png b/docs/07-Features/images/git-images/git-clone-dialog.png new file mode 100644 index 00000000..35bf163a Binary files /dev/null and b/docs/07-Features/images/git-images/git-clone-dialog.png differ diff --git a/docs/07-Features/images/git-images/git-clone-more-options.png b/docs/07-Features/images/git-images/git-clone-more-options.png new file mode 100644 index 00000000..2e5aa5f6 Binary files /dev/null and b/docs/07-Features/images/git-images/git-clone-more-options.png differ diff --git a/docs/07-Features/images/git-images/git-commit.png b/docs/07-Features/images/git-images/git-commit.png new file mode 100644 index 00000000..12a8ed6f Binary files /dev/null and b/docs/07-Features/images/git-images/git-commit.png differ diff --git a/docs/07-Features/images/git-images/git-diff-dialog.png b/docs/07-Features/images/git-images/git-diff-dialog.png new file mode 100644 index 00000000..c9e5aa60 Binary files /dev/null and b/docs/07-Features/images/git-images/git-diff-dialog.png differ diff --git a/docs/07-Features/images/git-images/git-diff-icon.png b/docs/07-Features/images/git-images/git-diff-icon.png new file mode 100644 index 00000000..a61349ff Binary files /dev/null and b/docs/07-Features/images/git-images/git-diff-icon.png differ diff --git a/docs/07-Features/images/git-images/git-init.png b/docs/07-Features/images/git-images/git-init.png new file mode 100644 index 00000000..f34ceda5 Binary files /dev/null and b/docs/07-Features/images/git-images/git-init.png differ diff --git a/docs/07-Features/images/git-images/git-overview.png b/docs/07-Features/images/git-images/git-overview.png new file mode 100644 index 00000000..58567d76 Binary files /dev/null and b/docs/07-Features/images/git-images/git-overview.png differ diff --git a/docs/07-Features/images/git-images/git-panel.png b/docs/07-Features/images/git-images/git-panel.png new file mode 100644 index 00000000..45efbf52 Binary files /dev/null and b/docs/07-Features/images/git-images/git-panel.png differ diff --git a/docs/07-Features/images/git-images/stage-files.png b/docs/07-Features/images/git-images/stage-files.png new file mode 100644 index 00000000..6d8b437a Binary files /dev/null and b/docs/07-Features/images/git-images/stage-files.png differ