| 1 | # Git |
| 2 | |
| 3 | g1t speaks git's smart HTTP protocol. Any git client works. |
| 4 | |
| 5 | ## Remotes |
| 6 | |
| 7 | ```text |
| 8 | https://g1t.sh/<owner>/<repo>.git |
| 9 | ``` |
| 10 | |
| 11 | Public repositories can be cloned without signing in: |
| 12 | |
| 13 | ```sh |
| 14 | git clone https://g1t.sh/syntaqx/g1t.git |
| 15 | ``` |
| 16 | |
| 17 | ## Authentication |
| 18 | |
| 19 | Pushing, and reading private repositories, needs credentials. Use your |
| 20 | username, and as the password either your account password or an |
| 21 | [access token](/settings). Tokens are recommended: they can be revoked |
| 22 | individually and they also work for the API. |
| 23 | |
| 24 | To avoid typing it each time, let git store it: |
| 25 | |
| 26 | ```sh |
| 27 | git config --global credential.helper store |
| 28 | ``` |
| 29 | |
| 30 | ## Creating a repository by pushing |
| 31 | |
| 32 | Pushing to a repository that does not exist under your own username creates |
| 33 | it as a public repository. |
| 34 | |
| 35 | ```sh |
| 36 | git push https://g1t.sh/<username>/new-repo.git main |
| 37 | ``` |
| 38 | |
| 39 | ## Private repositories |
| 40 | |
| 41 | A private repository is visible only to its owner. To everyone else it looks |
| 42 | exactly like a repository that does not exist, both on the site and to git. |
| 43 | |
| 44 | ## Attempt forks |
| 45 | |
| 46 | Each [attempt](/docs/concepts) has its own remote: |
| 47 | |
| 48 | ```text |
| 49 | https://g1t.sh/attempts/<attempt id>.git |
| 50 | ``` |
| 51 | |
| 52 | Only the person who started the attempt can push to it. Pushes to a fork |
| 53 | update the attempt's head commit on its page. |
| 54 | |
| 55 | ## Limits |
| 56 | |
| 57 | Repositories are stored in Cloudflare Artifacts, which limits a repository to |
| 58 | 1 GB and a single file to 32 MB. A single push is limited to 100 MB. |
| 59 | |
| 60 | ## SSH |
| 61 | |
| 62 | Git over SSH is not available yet. Use HTTPS. |