# Code editor

> For AI agents: the complete documentation index is at https://buddy.works/llms.txt

Learn how to make last-minute code changes, change repository provider, upload files, view history and compare versions using Buddy's online code browser.

Sometimes you must introduce a last-minute change in code just before the execution. With Buddy, you can do that quickly using the built-in code editor.

1. Go to the Code tab and click the file that you want to edit (or look it as shown on the screen):

![Searching for a repository file](https://buddy.works/docs/version-control/code-editor/code-editor-1.png)

2. Type in the changes. You will notice a commit box appearing at the bottom.
3. Edit description and hit **Commit** to push the changes to the repo.

![Committing changes in code editor](https://buddy.works/docs/version-control/code-editor/code-editor-2.png)

> **Tip**
>
> You can switch to full-screen mode using the button in top-right corner.
>
> ![Switching code editor to full-screen mode](https://buddy.works/docs/version-control/code-editor/code-editor-3.png)

> **Info**
>
> The code editor is cloud-based which means you don’t have to have a working copy on your disk to work on files.


## Code tab

"Code" tab is where you can find a list an manage your files. 

By clicking **Add file** you can :

- **Create a new file** \- to create a new file directly in the repository.
- **Upload files** \- to add files from your drive to the repository. 

From the dropdown menu (trhee dots in the upper right corner), you can: 

- **Find file** \- to search for a file by name.
- **Download** \- to download the entire repozitory as a ZIP file. 
- **Compare** \- to compare two branches, tags or last 20 commits. 
- **History** \- to review history of changes to the repository. 

## Repository Mirror management

When working with synchronized repositories (GitHub Mirror, GitLab Mirror, or Bitbucket Mirror), you can access them from the project sidebar. These Mirror views provide additional options for managing your repository connection:

### Manual fetch

The **Manual fetch** button is located next to the three dots menu and allows you to manually refresh the repository.

![Manual fetch button](https://buddy.works/docs/version-control/code-editor/manual-fetch.png)

### Switch repository or Git provider

To change the Git provider or select a different repository, use the **Switch repository or Git provider** option available in the three dots menu in the top right corner.

![Switch repository or Git provider](https://buddy.works/docs/version-control/code-editor/switch-repository.png)

### Connection log

To view synchronization logs, click on **Last sync** next to the three dots menu in the repository Mirror view. Alternatively, you can access connection logs via **Integrations** → select integration → **Connection** section → **Connection log**.

![Connection log](https://buddy.works/docs/version-control/code-editor/connection-log.png)

## Editing files

By entering a file you can edit it and access additional options:

![Code editor file - options](https://buddy.works/docs/version-control/code-editor/code-editor-5.png)

- **Upload new version** \- change the file with a newer version.
- **Download** \- download just this file. 
- **Raw** \- check the contents of the file in the raw version.
- **History** \- Review the history of this file.
- **Compare** \- Compare the file with a different version.
- **Delete** \- Delete the file from repository. 

### Blame

Blame allows you to check, who and when entered a specific line of code in the file. 

![Blame](https://buddy.works/docs/version-control/code-editor/code-editor-4.png)

### Compare 

Compare, allows you to compare changes between two: 

- **branches** (e.g., `master` vs `feature-x`),
- **commits** (by selecting commits from the list),
- **tags** (if the tags are defined in the repository).

You can also use the `At date` option, and compare the current state with the history from a specific day.

![Compare interface](https://buddy.works/docs/version-control/code-editor/code-editor-compare-1.png)

After selecting the items to compare, Buddy will show an exact diff – modified files and lines of code (added/changed/removed).

![Compare diff view](https://buddy.works/docs/version-control/code-editor/code-editor-compare-2.png)


---
Original source: https://buddy.works/docs/git-hosting/code-editor