Releases: go-git/go-git
v6.0.0-alpha.2
🚀 Release Summary
⚠️ v6 Alpha ReleaseThis is an alpha release of go-git v6.
We encourage users to test this version in real-world scenarios and help us validate the new transport layer and features.
👉 Please report any issues, bugs, or unexpected behavior via GitHub issues.
This release brings major improvements across transport, performance, and Git feature support, along with significant internal modernization.
🚀 Highlights
- Major refactor of the plumbing/transport API with a new design, improving extensibility and aligning behaviour more closely with upstream Git.
- Performance improvements in remote operations, including faster send-pack.
- Significant improvements to HTTP transport robustness and protocol correctness.
- File transport: added support for
gitfileand improved repository detection logic.
🐛 Bug Fixes
- repository: fix DeleteBranch failing when using full ref names (#1951)
- worktree: fix Add silently failing for absolute paths (#1949)
- transport/http: fix multi-round pack negotiation (#1992)
- transport/http: harden redirect handling to match canonical Git (#1997)
- transport/http: fix data race in dumb HTTP test server (#1960)
- transport: avoid emitting duplicate NAK after empty ACKs (#1989)
- updreq: support multiple shallow records in upload request decoding (#1952)
- file transport: fix Windows file handle leak (#1976)
- worktree tests: fix Windows file handle leaks (#1996)
- transport tests: correct receive-pack usage (#1988)
✨ Enhancements
- remote: faster send-pack implementation (#1947)
- object: improved object walk painting (#1973)
- repository: add gitfile support and improve loader detection (#1994)
- config: introduce ConfigLoader plugins aligned with upstream Git (#1924)
🔧 Refactoring
- plumbing/transport: replace transport API with new design (#1972)
- plumbing/transport: follow-up API refactoring and cleanup (#1983)
📚 Documentation
- docs: updates and introduction of AI Policy (#1913)
📋 Full Changelog
What's Changed
- git: repository, fix DeleteBranch failing with full ref name by @tmchow in #1951
- build: Update golang (main) by @go-git-renovate[bot] in #1931
- git: worktree, fix Add silently failing for absolute paths by @tmchow in #1949
- build: Update github.com/go-git/go-git-fixtures/v5 digest to eda62fa (main) by @go-git-renovate[bot] in #1834
- fix(updreq): support multiple shallow records in upload request decoding by @yuzhuo in #1952
- plumbing: transport/http, Fix data race in dumb HTTP test server by preventing sendfile optimization. by @MotanOfficial in #1960
- build: Update go-git (main) by @go-git-renovate[bot] in #1969
- Update docs and introduce AI Policy by @pjbgf in #1913
- Faster send pack for remote by @stiak in #1947
- plumbing: transport, replace transport API with new design by @aymanbagabas in #1972
plumbing/transportAPI Refactoring by @pjbgf in #1983- plumbing: transport, correct the test to use the correct receive-pack… by @aymanbagabas in #1988
- Object walk painting by @stiak in #1973
- build: Update golang (main) by @go-git-renovate[bot] in #1975
- Fix Windows file handle leak in file transport by @AriehSchneier in #1976
- plumbing/transport: don't emit a second NAK after encoding empty ACKs by @Soph in #1989
- Fix file handle leaks in worktree tests on Windows by @AriehSchneier in #1996
- Add gitfile support and fix loader repository detection by @AriehSchneier in #1994
- plumbing: transport/http, fix multi-round pack negotiation by @stiak in #1992
- Implement
ConfigLoaderplugins that aligns with upstream behaviour by @pjbgf in #1924 - plumbing: transport/http, harden redirect handling to match canonical git by @aymanbagabas in #1997
New Contributors
- @tmchow made their first contribution in #1951
- @MotanOfficial made their first contribution in #1960
- @stiak made their first contribution in #1947
Full Changelog: v6.0.0-alpha.1...v6.0.0-alpha.2
v5.18.0
v6.0.0-alpha.1
🚀 Release Summary
⚠️ v6 Alpha ReleaseThis is the first alpha release of go-git v6.
We encourage users to test this version in real-world scenarios and help us validate the new transport layer and features.
👉 Please report any issues, bugs, or unexpected behavior via GitHub issues.
This release brings major improvements across transport, performance, and Git feature support, along with significant internal modernization.
👤 What Changed for Users
🌐 Better Git Compatibility
- Improved support for modern Git protocol features:
- multi-ack, filters (partial clone), sideband
- better HTTP and SSH transport handling
- More reliable push/fetch behavior, especially for:
- shallow clones
- large repositories
- edge-case server interactions
🆕 Support for Git Features
- Cherry-pick support
- Reflog support
git reset --keepequivalent- Autocrlf support
- Improved linked worktree support (
git worktree) - Support for **relative submodule URLs
🔐 SHA-256 Repository Support
- Open, initialize, and clone SHA-256 repositories
⚙️ Config & Feature Parity
- Support for Git features:
core.hooksPathindex.skipHashworktreeConfig
⚡ Performance Improvements
- Faster operations on large repositories:
- improved status calculation
- optimized packfile handling
- reduced memory usage
🧹 Stability & Reliability
- Fixed many issues around:
- push/fetch correctness
- worktree operations
- filesystem handling
- Windows compatibility
- Fewer crashes and race conditions
🛠️ What Changed Internally
🚧 Major: Transport Overhaul
- Complete redesign of the transport layer
- New APIs and cleaner abstractions
- Expanded protocol support (v1/v2, HTTP, SSH, Git)
- File transport no longer relies on the git binary being present
- Foundation for future improvements
🔄 Protocol & Transport Refactor
- Improved negotiation, capability handling, and error reporting
- Added server-side capabilities and middleware support
- Better handling of edge cases (EOF, flushing, sideband)
🧠 Performance & Scalability Work
- New index strategies (LazyIndex, stat-based cache)
- Large repo optimizations (PackScanner, delta processing)
- Reduced allocations and improved memory usage
🧪 Testing & Quality Improvements
- Migration from gocheck → testify
- Expanded transport and integration test coverage
- Many flaky/race tests fixed
🔍 Linting & Code Quality
- Enabled extensive linting (staticcheck, govet, revive, etc.)
- Improved code consistency and maintainability
📦 Build & Dependency Maintenance
- Large number of dependency updates (security + maintenance)
- CI/CD improvements and automation (Renovate, Scorecard)
- Updated Go versions and support policy
📋 Full Changelog
What's Changed
- build: bump github.com/go-git/go-git/v5 from 5.11.0 to 5.12.0 in /cli/go-git by @dependabot[bot] in #1065
- build: bump golang.org/x/net from 0.22.0 to 0.23.0 by @dependabot[bot] in #1068
- build: bump golang.org/x/net from 0.23.0 to 0.24.0 by @dependabot[bot] in #1071
- Properly support skipping of non-mandatory extensions by @codablock in #1066
- git: Refine some codes in test and non-test. by @onee-only in #1077
- plumbing: protocol/packp, client-side filter capability support by @edigaryev in #1000
- build: bump golang.org/x/net from 0.22.0 to 0.23.0 in /cli/go-git by @dependabot[bot] in #1078
- plumbing: fix sideband demux on flush by @aymanbagabas in #1084
- storage: dotgit, head reference usually comes first by @aymanbagabas in #1085
- build: bump golang.org/x/text from 0.14.0 to 0.15.0 by @dependabot[bot] in #1091
- build: bump golang.org/x/crypto from 0.22.0 to 0.23.0 by @dependabot[bot] in #1094
- build: bump golang.org/x/net from 0.24.0 to 0.25.0 by @dependabot[bot] in #1093
- git: Added an example for Repository.Branches by @johnmatthiggins in #1088
- git: worktree_commit, Modify checking empty commit. Fixes #723 by @onee-only in #1050
- plumbing: transport/http, Wrap http errors to return reason. Fixes #1097 by @ggambetti in #1100
- build: bump golang.org/x/sys from 0.20.0 to 0.21.0 by @dependabot[bot] in #1106
- build: bump golang.org/x/text from 0.15.0 to 0.16.0 by @dependabot[bot] in #1107
- Bumps Go versions and go-billy by @pjbgf in #1056
- _examples: Fixed a dead link COMPATIBILITY.md by @gecko655 in #1109
- Refactor pktline by @aymanbagabas in #1082
- build: bump github.com/jessevdk/go-flags from 1.5.0 to 1.6.1 in /cli/go-git by @dependabot[bot] in #1115
- build: bump github.com/elazarl/goproxy from v0.0.0-20230808193330-2592e75ae04a to v0.0.0-20240618083138-03be62527ccb by @hbelmiro in #1124
- build: bump golang.org/x/net from 0.25.0 to 0.26.0 by @dependabot[bot] in #1104
- Add option approximating
git clean -xflag. by @msuozzo in #995 - Revert "Add option approximating
git clean -xflag." by @pjbgf in #1129 - Fix reference updated concurrently error for the filesystem storer by @Javier-varez in #1116
- build: bump golang.org/x/net from 0.26.0 to 0.27.0 by @dependabot[bot] in #1134
- utils: merkletrie, Align error message with upstream by @pjbgf in #1142
- plumbing: transport/file, Change paths to absolute by @pjbgf in #1141
- plumbing: gitignore, Fix loading of ignored .gitignore files. by @Achilleshiel in #1114
- build: bump github.com/skeema/knownhosts from 1.2.2 to 1.3.0 by @dependabot[bot] in #1147
- plumbing: transport/ssh, Add support for SSH @cert-authority. by @Javier-varez in #1157
- build: run example tests during CI workflow by @crazybolillo in #1030
- storage: filesystem, Fix object cache not working due to uninitialised objects being put into cache by @SatelliteMind in #1138
- git: Fix fetching missing commits by @AriehSchneier in #1032
- plumbing: format/packfile, remove duplicate checks in findMatch() by @edigaryev in #1152
- git: worktree, Fix file reported as
Untrackedwhile it is committed by @rodrigocam in #1023 - build: bump golang.org/x/sys from 0.22.0 to 0.23.0 by @dependabot[bot] in #1160
- plumbing: filemode, Remove check for setting size of .git/index file by @nicholasSUSE in #1159
- build: bump golang.org/x/net from 0.27.0 to 0.28.0 by @dependabot[bot] in #1163
- Fix some lint warning and increase stalebot to 180 days by @pjbgf in #1128
- adjust path extracted from file: url on Windows by @tomqwpl in #416
- build: bump golang.org/x/sys from 0.23.0 to 0.24.0 by @dependabot[bot] in #1164
- [v6-exp] Consolidate in-flight changes by @pjbgf in #1166
- plumbing: allow discovery of non bare repos in fsLoader by @jakobmoellerdev in #1173
- [v6-exp] Expand trace support for SSH and Performance by @pjbgf in #1172
- v6: Consume push URLs when they are provided by @mcepl in #1192
- [v6-exp] git: options, Fix typo of SubmoduleRecursivity. Fixes #197 by @onee-only in #1205
- [v6-exp] git: worktree, Fix sparse reset. by @onee-only in #1208
- [v6-exp] plumbing: Improve PACK trace by redacting binary data by @pjbgf in #1214
- server: uploadpack, implement multi_ack capability by @manland in #1204
- [v6-exp] plumbing: packfile, Refactor Parser and Scanner logic by @pjbgf in #1228
- [v6-exp] Forward port changes from
masterby @pjbgf in #1252 - [v6-exp] New performance focused clone example + forward ports by @pjbgf in #1255
- [v6-exp] Build improvements + forward ports by @pjbgf in #1258
- pktline : Accept uppercase hexa in pktline length by @BeChris in #1259
- git: worktree_commit, sanitize author and commiter name and email before creating the commit object. Fixes #680 by @BeChris in #1263
- plumbing: object, limit logs by trailing hash by @d-fal in #1227
- plumbing: filemode, gocheck t...
v5.17.2
What's Changed
- build: Update module github.com/go-git/go-git/v5 to v5.17.1 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1941
- dotgit: skip writing pack files that already exist on disk by @pjbgf in #1944
v5.17.1. Thanks @pskrbasu for reporting it. 🙇
Full Changelog: v5.17.1...v5.17.2
v5.17.1
What's Changed
- build: Update module github.com/cloudflare/circl to v1.6.3 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1930
- [v5] plumbing: format/index, Improve v4 entry name validation by @pjbgf in #1935
- [v5] plumbing: format/idxfile, Fix version and fanout checks by @pjbgf in #1937
Full Changelog: v5.17.0...v5.17.1
v5.17.0
What's Changed
- build: Update module github.com/go-git/go-git/v5 to v5.16.5 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1839
- git: worktree, optimize infiles function for very large repos by @k-anshul in #1853
- git: Add strict checks for supported extensions by @pjbgf in #1861
- backport, git: Improve Status() speed with new index.ModTime check by @cedric-appdirect in #1862
- storage: filesystem, Avoid overwriting loose obj files by @pjbgf in #1864
Full Changelog: v5.16.5...v5.17.0
v5.16.5
What's Changed
- build: Update module golang.org/x/crypto to v0.45.0 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1744
- build: Bump Go test versions to 1.23-1.25 (v5) by @pjbgf in #1746
- [v5] git: worktree, Don't delete local untracked files when resetting worktree by @Ch00k in #1800
- Expand packfile checks by @pjbgf in #1836
Full Changelog: v5.16.4...v5.16.5
v5.16.4
What's Changed
- backport plumbing: format/idxfile, prevent panic by @swills in #1732
- [backport] build: test, Fix build on Windows. by @pjbgf in #1734
- build: Update module golang.org/x/net to v0.38.0 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1742
- build: Update module github.com/cloudflare/circl to v1.6.1 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1741
- build: Update module github.com/go-git/go-git/v5 to v5.13.0 [SECURITY] (releases/v5.x) by @go-git-renovate[bot] in #1743
Full Changelog: v5.16.3...v5.16.4