Open and edit files
A file you open in GitTree gets its own tab beside the pinned Graph tab. A file from a commit is read-only; Edit in Working Directory opens the copy in your project to edit and Save. If the file changes on disk meanwhile, GitTree saves nothing and lets you choose.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
Before you start
- A repository is open. To browse its folders first, see Browse and edit project files.
Where to find it
- Double-click a file in Files, or right-click a file anywhere: Open File.
- The tab’s menu: Close File, Close Other Files, Close Saved Files.
| Action | macOS | Windows and Linux |
|---|---|---|
| Show Files | ⌘⇧E | Ctrl+Shift+E |
The command palette, then : and a file name | ⌘⇧P | Ctrl+Shift+P |
Steps
Open the file
Open a file from Files, a commit or a diff. A file from a commit shows at that revision and cannot be edited.
Edit the working copy
Choose Edit in Working Directory. The tab shows Editing, and Unsaved changes once you type.
Save
Press Save. GitTree says Saved with the file’s path, and the change appears under Unstaged Files.
Close what you are done with
Close a tab, or use Close Saved Files to keep only files with unsaved edits. Leaving a file with edits asks Save, Discard or Stay.
Expected result
Your edit is saved to the working folder and ready to stage and commit.
When the file changed on disk
If another program changed the file after you opened it, saving stops with “This file changed on disk since you opened it.” Nothing is overwritten. Choose Reload from Disk to drop your edits, Keep Editing, or Review Changes to compare Your edits with On disk now and then Overwrite with My Edits.
If something goes wrong
“This file does not exist in the working folder”
The file was deleted or renamed in your project. Open it from a commit to read it, or restore it first.
“Binary file — no text to show”
Binary files cannot be edited here; use Open in External Editor.
Questions
Do my open files stay when I go back to the graph?
Yes. Their tabs remain beside the Graph tab with their unsaved edits.