withr::with_tempdir({
gert::git_init()
gert::git_config_set("user.name", "R Example")
gert::git_config_set("user.email", "ex@example.com")
writeLines("hello, world", "hello.md")
gert::git_add("hello.md")
gert::git_commit("Initial commit")
writeLines("hello, universe", "hello.md")
# What the LLM sees
cat(btw_tool_git_diff()@value)
})
Run the code above in your browser using DataLab