Skip to content
GitTree
Preferences

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.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. What the diff tells you
  6. If something goes wrong
  7. Questions
  8. Related

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.
ActionmacOSWindows and Linux
Preferences⌘,Ctrl+,

Steps

  1. Set the default encoding

    In Editor, choose the Default encoding your old files use. Diffs then say Read as ….

  2. 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.

  3. 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.