How godotengine/godot-git-plugin works
Godot Git Plugin implements Godot’s editor VCS interface, using libgit2 to provide Git operations. The principal workflow is: Godot’s editor invokes the registered VCS extension, which initializes a repository and exposes working-tree changes for staging, diffing, and committing; users can also manage branches and remotes or fetch, pull, and push. The source excerpt shows representative operations and callback behavior, but not every endpoint, so links for unsampled interactions are omitted or marked unverified.
Main entry points: git_plugin.h Git VCS Interface · libgit2 libgit2 Backend · git_plugin.cpp Fetch Pull Push · gdlibrary.cpp Extension Registration
Components 16
Godot Extension
- Extension Registration
godot-git-plugin/src/gdlibrary.cpp - Git VCS Interface
godot-git-plugin/src/git_plugin.h
Local Repository
- Repository Setup
godot-git-plugin/src/git_plugin.cpp - Working Tree Status
godot-git-plugin/src/git_plugin.cpp - Stage And Discard
godot-git-plugin/src/git_plugin.cpp - Branch Management
godot-git-plugin/src/git_plugin.cpp
History And Diffs
- Commit Creation
godot-git-plugin/src/git_plugin.cpp - Commit History
godot-git-plugin/src/git_plugin.cpp - Diff Inspection
godot-git-plugin/src/git_plugin.cpp
Remote Operations
- Remote Management
godot-git-plugin/src/git_plugin.cpp - Fetch Pull Push
godot-git-plugin/src/git_plugin.cpp - Git Callbacks
godot-git-plugin/src/git_callbacks.cpp
Git Internals
- Resource Wrappers
godot-git-plugin/src/git_wrappers.h - libgit2 Backend
thirdparty/git2/libgit2
Other components
- Godot Editor
- Git Remote
Connections 25
- Godot Editor → Extension Registration: loads extension
README.md - Extension Registration → Git VCS Interface: registers class
godot-git-plugin/src/gdlibrary.cpp - Godot Editor → Git VCS Interface: invokes VCS
README.md - Git VCS Interface → Repository Setup: initializes
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Working Tree Status: queries status
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Stage And Discard: requests changes
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Commit Creation: requests commit
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Commit History: requests history
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Diff Inspection: requests diff
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Branch Management: manages branches
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Remote Management: manages remotes
godot-git-plugin/src/git_plugin.h - Git VCS Interface → Fetch Pull Push: requests sync
godot-git-plugin/src/git_plugin.h - Repository Setup → libgit2 Backend: uses backend
README.md - Working Tree Status → libgit2 Backend: reads status
godot-git-plugin/src/git_plugin.cpp - Commit Creation → libgit2 Backend: writes commit
godot-git-plugin/src/git_plugin.cpp - Commit History → libgit2 Backend: walks history
godot-git-plugin/src/git_plugin.cpp - Diff Inspection → libgit2 Backend: reads diff
godot-git-plugin/src/git_plugin.cpp - Branch Management → libgit2 Backend: updates refs
godot-git-plugin/src/git_plugin.cpp - Remote Management → libgit2 Backend: configures remotes
godot-git-plugin/src/git_plugin.cpp - Fetch Pull Push → libgit2 Backend: performs transfer
README.md - Fetch Pull Push → Git Remote: exchanges data
- Fetch Pull Push → Git Callbacks: uses callbacks
- Git Callbacks → Git VCS Interface: reports diff hunks
godot-git-plugin/src/git_callbacks.cpp - Git VCS Interface → Resource Wrappers: uses wrappers
godot-git-plugin/src/git_plugin.h - Working Tree Status → Resource Wrappers: manages resources
godot-git-plugin/src/git_plugin.cpp