Configure tools and file encoding
Diffs and files that are not UTF-8 are read with Preferences › Editor › Default encoding; a byte-order mark always wins, and bytes that do not fit show as �. Line endings (core.autocrlf) decides how git converts CRLF and LF, and Long paths lets git create paths over 260 characters on Windows.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
Before you start
- Know your team’s line-ending convention; it should match on every computer.
Where to find it
- Preferences › Editor for encoding; Preferences › General for Line endings and Long paths.
| Action | macOS | Windows and Linux |
|---|---|---|
| Preferences | ⌘, | Ctrl+, |
Steps
Set the default encoding
In Editor, choose the Default encoding your old files use. Diffs then say Read as ….
Choose line endings
In General, set Line endings. On Windows, Check out CRLF, commit LF keeps the repository in LF while your editor sees CRLF.
Allow long paths on Windows
Turn on Long paths if a project with deep folders fails to check out.
Expected result
Text reads correctly and line endings stay the way your team keeps them.
What the diff tells you
- CRLF beside a file: its lines end with CRLF (
\r\n). - “Some lines end with LF and some with CRLF”: the file mixes both.
- “Some bytes are not valid … and show as �”: choose another Default encoding.
For the editor, diff and merge tools GitTree opens, see Configure external tools.
If something goes wrong
Every line of a file shows as changed
Only its line endings changed. Match Line endings with your team’s, and consider a .gitattributes with * text=auto.
Questions
Does the encoding setting change my files?
No. It only changes how GitTree reads and shows them.