docs: Clarify `CreateTree` semantics and `TreeEntry` usage by rogpeppe · Pull Request #3877 · google/go-github

@gmlewis changed the title docs: clarify CreateTree semantics and TreeEntry usage docs: Clarify CreateTree semantics and TreeEntry usage

Dec 11, 2025

gmlewis

@rogpeppe

Document the merge behavior when baseTree is provided, how to delete
files and directories by setting SHA and Content to nil, and that
duplicate paths result in last-entry-wins behavior.

Also document on TreeEntry how to use Content vs SHA, referencing
CreateBlob for binary files, and that Type/Mode are ignored when
deleting.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>

stevehipwell