1# Supported Features
2
3Here is a non-comprehensive table of git commands and features and their
4compatibility status with go-git.
5
6## Getting and creating repositories
7
8| Feature | Sub-feature | Status | Notes | Examples |
9| ------- | ------------------------------------------------------------------------------------------------------------------ | ------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10| `init` | | ✅ | | |
11| `init` | `--bare` | ✅ | | |
12| `init` | `--template` <br/> `--separate-git-dir` <br/> `--shared` | ❌ | | |
13| `clone` | | ✅ | | - [PlainClone](_examples/clone/main.go) |
14| `clone` | Authentication: <br/> - none <br/> - access token <br/> - username + password <br/> - ssh | ✅ | | - [clone ssh (private_key)](_examples/clone/auth/ssh/private_key/main.go) <br/> - [clone ssh (ssh_agent)](_examples/clone/auth/ssh/ssh_agent/main.go) <br/> - [clone access token](_examples/clone/auth/basic/access_token/main.go) <br/> - [clone user + password](_examples/clone/auth/basic/username_password/main.go) |
15| `clone` | `--progress` <br/> `--single-branch` <br/> `--depth` <br/> `--origin` <br/> `--recurse-submodules` <br/>`--shared` | ✅ | | - [recurse submodules](_examples/clone/main.go) <br/> - [progress](_examples/progress/main.go) |
16
17## Basic snapshotting
18
19| Feature | Sub-feature | Status | Notes | Examples |
20| -------- | ----------- | ------ | -------------------------------------------------------- | ------------------------------------ |
21| `add` | | ✅ | Plain add is supported. Any other flags aren't supported | |
22| `status` | | ✅ | | |
23| `commit` | | ✅ | | - [commit](_examples/commit/main.go) |
24| `reset` | | ✅ | | |
25| `rm` | | ✅ | | |
26| `mv` | | ✅ | | |
27
28## Branching and merging
29
30| Feature | Sub-feature | Status | Notes | Examples |
31| ----------- | ----------- | ------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------- |
32| `branch` | | ✅ | | - [branch](_examples/branch/main.go) |
33| `checkout` | | ✅ | Basic usages of checkout are supported. | - [checkout](_examples/checkout/main.go) |
34| `merge` | | ⚠️ (partial) | Fast-forward only | |
35| `mergetool` | | ❌ | | |
36| `stash` | | ❌ | | |
37| `sparse-checkout` | | ✅ | | - [sparse-checkout](_examples/sparse-checkout/main.go) |
38| `tag` | | ✅ | | - [tag](_examples/tag/main.go) <br/> - [tag create and push](_examples/tag-create-push/main.go) |
39
40## Sharing and updating projects
41
42| Feature | Sub-feature | Status | Notes | Examples |
43| ----------- | ----------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------ |
44| `fetch` | | ✅ | | |
45| `pull` | | ✅ | Only supports merges where the merge can be resolved as a fast-forward. | - [pull](_examples/pull/main.go) |
46| `push` | | ✅ | | - [push](_examples/push/main.go) |
47| `remote` | | ✅ | | - [remotes](_examples/remotes/main.go) |
48| `submodule` | | ✅ | | - [submodule](_examples/submodule/main.go) |
49| `submodule` | deinit | ❌ | | |
50
51## Inspection and comparison
52
53| Feature | Sub-feature | Status | Notes | Examples |
54| ---------- | ----------- | --------- | ----- | ------------------------------ |
55| `show` | | ✅ | | |
56| `log` | | ✅ | | - [log](_examples/log/main.go) |
57| `shortlog` | | (see log) | | |
58| `describe` | | ❌ | | |
59
60## Patching
61
62| Feature | Sub-feature | Status | Notes | Examples |
63| ------------- | ----------- | ------ | ---------------------------------------------------- | -------- |
64| `apply` | | ❌ | | |
65| `cherry-pick` | | ❌ | | |
66| `diff` | | ✅ | Patch object with UnifiedDiff output representation. | |
67| `rebase` | | ❌ | | |
68| `revert` | | ❌ | | |
69
70## Debugging
71
72| Feature | Sub-feature | Status | Notes | Examples |
73| -------- | ----------- | ------ | ----- | ---------------------------------- |
74| `bisect` | | ❌ | | |
75| `blame` | | ✅ | | - [blame](_examples/blame/main.go) |
76| `grep` | | ✅ | | |
77
78## Email
79
80| Feature | Sub-feature | Status | Notes | Examples |
81| -------------- | ----------- | ------ | ----- | -------- |
82| `am` | | ❌ | | |
83| `apply` | | ❌ | | |
84| `format-patch` | | ❌ | | |
85| `send-email` | | ❌ | | |
86| `request-pull` | | ❌ | | |
87
88## External systems
89
90| Feature | Sub-feature | Status | Notes | Examples |
91| ------------- | ----------- | ------ | ----- | -------- |
92| `svn` | | ❌ | | |
93| `fast-import` | | ❌ | | |
94| `lfs` | | ❌ | | |
95
96## Administration
97
98| Feature | Sub-feature | Status | Notes | Examples |
99| --------------- | ----------- | ------ | ----- | -------- |
100| `clean` | | ✅ | | |
101| `gc` | | ❌ | | |
102| `fsck` | | ❌ | | |
103| `reflog` | | ❌ | | |
104| `filter-branch` | | ❌ | | |
105| `instaweb` | | ❌ | | |
106| `archive` | | ❌ | | |
107| `bundle` | | ❌ | | |
108| `prune` | | ❌ | | |
109| `repack` | | ❌ | | |
110
111## Server admin
112
113| Feature | Sub-feature | Status | Notes | Examples |
114| -------------------- | ----------- | ------ | ----- | ----------------------------------------- |
115| `daemon` | | ❌ | | |
116| `update-server-info` | | ✅ | | [cli](./cli/go-git/update_server_info.go) |
117
118## Advanced
119
120| Feature | Sub-feature | Status | Notes | Examples |
121| ---------- | ----------- | ----------- | ----- | -------- |
122| `notes` | | ❌ | | |
123| `replace` | | ❌ | | |
124| `worktree` | | ❌ | | |
125| `annotate` | | (see blame) | | |
126
127## GPG
128
129| Feature | Sub-feature | Status | Notes | Examples |
130| ------------------- | ----------- | ------ | ----- | -------- |
131| `git-verify-commit` | | ✅ | | |
132| `git-verify-tag` | | ✅ | | |
133
134## Plumbing commands
135
136| Feature | Sub-feature | Status | Notes | Examples |
137| --------------- | ------------------------------------- | ------------ | --------------------------------------------------- | -------------------------------------------- |
138| `cat-file` | | ✅ | | |
139| `check-ignore` | | ❌ | | |
140| `commit-tree` | | ❌ | | |
141| `count-objects` | | ❌ | | |
142| `diff-index` | | ❌ | | |
143| `for-each-ref` | | ✅ | | |
144| `hash-object` | | ✅ | | |
145| `ls-files` | | ✅ | | |
146| `ls-remote` | | ✅ | | - [ls-remote](_examples/ls-remote/main.go) |
147| `merge-base` | `--independent` <br/> `--is-ancestor` | ⚠️ (partial) | Calculates the merge-base only between two commits. | - [merge-base](_examples/merge_base/main.go) |
148| `merge-base` | `--fork-point` <br/> `--octopus` | ❌ | | |
149| `read-tree` | | ❌ | | |
150| `rev-list` | | ✅ | | |
151| `rev-parse` | | ❌ | | |
152| `show-ref` | | ✅ | | |
153| `symbolic-ref` | | ✅ | | |
154| `update-index` | | ❌ | | |
155| `update-ref` | | ❌ | | |
156| `verify-pack` | | ❌ | | |
157| `write-tree` | | ❌ | | |
158
159## Indexes and Git Protocols
160
161| Feature | Version | Status | Notes |
162| -------------------- | ------------------------------------------------------------------------------- | ------ | ----- |
163| index | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) | ❌ | |
164| index | [v2](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) | ✅ | |
165| index | [v3](https://github.com/git/git/blob/master/Documentation/gitformat-index.txt) | ❌ | |
166| pack-protocol | [v1](https://github.com/git/git/blob/master/Documentation/gitprotocol-pack.txt) | ✅ | |
167| pack-protocol | [v2](https://github.com/git/git/blob/master/Documentation/gitprotocol-v2.txt) | ❌ | |
168| multi-pack-index | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) | ❌ | |
169| pack-\*.rev files | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) | ❌ | |
170| pack-\*.mtimes files | [v1](https://github.com/git/git/blob/master/Documentation/gitformat-pack.txt) | ❌ | |
171| cruft packs | | ❌ | |
172
173## Capabilities
174
175| Feature | Status | Notes |
176| ------------------------------ | ------------ | ----- |
177| `multi_ack` | ❌ | |
178| `multi_ack_detailed` | ❌ | |
179| `no-done` | ❌ | |
180| `thin-pack` | ❌ | |
181| `side-band` | ⚠️ (partial) | |
182| `side-band-64k` | ⚠️ (partial) | |
183| `ofs-delta` | ✅ | |
184| `agent` | ✅ | |
185| `object-format` | ❌ | |
186| `symref` | ✅ | |
187| `shallow` | ✅ | |
188| `deepen-since` | ✅ | |
189| `deepen-not` | ❌ | |
190| `deepen-relative` | ❌ | |
191| `no-progress` | ✅ | |
192| `include-tag` | ✅ | |
193| `report-status` | ✅ | |
194| `report-status-v2` | ❌ | |
195| `delete-refs` | ✅ | |
196| `quiet` | ❌ | |
197| `atomic` | ✅ | |
198| `push-options` | ✅ | |
199| `allow-tip-sha1-in-want` | ✅ | |
200| `allow-reachable-sha1-in-want` | ❌ | |
201| `push-cert=<nonce>` | ❌ | |
202| `filter` | ❌ | |
203| `session-id=<session id>` | ❌ | |
204
205## Transport Schemes
206
207| Scheme | Status | Notes | Examples |
208| -------------------- | ------------ | ---------------------------------------------------------------------- | ---------------------------------------------- |
209| `http(s)://` (dumb) | ❌ | | |
210| `http(s)://` (smart) | ✅ | | |
211| `git://` | ✅ | | |
212| `ssh://` | ✅ | | |
213| `file://` | ⚠️ (partial) | Warning: this is not pure Golang. This shells out to the `git` binary. | |
214| Custom | ✅ | All existing schemes can be replaced by custom implementations. | - [custom_http](_examples/custom_http/main.go) |
215
216## SHA256
217
218| Feature | Sub-feature | Status | Notes | Examples |
219| -------- | ----------- | ------ | ---------------------------------- | ------------------------------------ |
220| `init` | | ✅ | Requires building with tag sha256. | - [init](_examples/sha256/main.go) |
221| `commit` | | ✅ | Requires building with tag sha256. | - [commit](_examples/sha256/main.go) |
222| `pull` | | ❌ | | |
223| `fetch` | | ❌ | | |
224| `push` | | ❌ | | |
225
226## Other features
227
228| Feature | Sub-feature | Status | Notes | Examples |
229| --------------- | --------------------------- | ------ | ---------------------------------------------- | -------- |
230| `config` | `--local` | ✅ | Read and write per-repository (`.git/config`). | |
231| `config` | `--global` <br/> `--system` | ✅ | Read-only. | |
232| `gitignore` | | ✅ | | |
233| `gitattributes` | | ✅ | | |
234| `git-worktree` | | ❌ | Multiple worktrees are not supported. | |