Making Changes and Commits
APIGit provides an intuitive interface for editing files and committing changes to your API repositories. This guide walks you through the process of making changes and creating commits.
Step 1: Select a File and Enter Edit Mode
In your API Repository, navigate to the file you want to edit. Different file types will open in specialized visual editors based on the file’s content and purpose.
For example, to edit an API Specification:
- Navigate to the API & Documents tab
- Select the specification file
- Click the “Edit” icon button in the bottom left corner to enter the API Spec editor

Within the editor, you can switch between different views to facilitate your editing process. For an API specification the views are Form, Code, Diff, Governance and Preview; for a mock script they are Code and Diff.

Step 2: Review Your Changes
Your edits are kept as local drafts until you commit them, so you can change several files and commit them together. A note next to the view tabs shows the number of uncommitted files.
After completing your edits, switch to the Diff view to review the changes before committing. This allows you to verify that only intended modifications are included in your commit.

Open the Changes tab in the sidebar, or click Review next to the note, to see every changed file.

From this tab you can:
- Tick the files to include in the commit, or use All changes
- Revert one file, or all of them, with the undo icon next to it
- Remove every draft in this view with Discard all drafts
Step 3: Submit Your Changes
When you’re satisfied with your changes:
- Click the Commit button in the Changes tab
- Choose Commit directly to the current branch, or Create a new branch for this commit and enter its name
- Add a descriptive commit message that explains the purpose of your changes
- Click Commit to commit your changes to the APIGit backend

Once successfully committed, a new commit record will be generated in your repository’s history, just like a regular Git commit.
Leaving Edit Mode with Uncommitted Changes
If you click Exit edit while you have uncommitted changes, APIGit asks what to do with them: Exit with saved draft keeps your drafts so you can pick up where you left off, and Discard draft and exit removes them. Switching to another branch while editing asks the same question, with Switch with saved draft and Discard changes and switch.
Handling Conflicts
If the file changed on the server since you started editing, APIGit tries to merge the changes for you. If there are conflicts (for instance, someone else modified the same lines), the Commit button stays disabled and APIGit shows a banner with a Resolve button. You can:
- Click Resolve to open the Review and resolve conflicts with HEAD dialog
- Make necessary adjustments to resolve the conflicts, and click Save changes
- Commit again
The banner also covers files that were deleted on the server, or added there with the same name as yours. View on server shows the version on the server.
This workflow ensures that all changes are properly tracked and integrated into your repository’s history.