|
1 |
| -# git-bundle-server |
2 |
| -Bundle Server for Git |
| 1 | +# `git-bundle-server`: Manage a self-hosted bundle server |
| 2 | + |
| 3 | +By running this software, you can self-host a bundle server to work with Git's |
| 4 | +[bundle URI feature][bundle-uris]. |
| 5 | + |
| 6 | +[bundle-uris]: https://github.com/git/git/blob/next/Documentation/technical/bundle-uri.txt |
| 7 | + |
| 8 | +## Bundle Management through CLI |
| 9 | + |
| 10 | +The following command-line interface allows you to manage which repositories are |
| 11 | +being managed by the bundle server. |
| 12 | + |
| 13 | +* `git-bundle-server init <url> [<route>]`: Initialize a repository by cloning a |
| 14 | + bare repo from `<url>`. If `<route>` is specified, then it is the bundle |
| 15 | + server route to find the data for this repository. Otherwise, the route is |
| 16 | + inferred from `<url>` by removing the domain name. For example, |
| 17 | + `https://github.com/git-for-windows/git` is assigned the route |
| 18 | + `/git-for-windows/git`. Run `git-bundle-server update` to initialize bundle |
| 19 | + information. Configure the web server to recognize this repository at that |
| 20 | + route. Configure scheduler to run `git-bundle-server update --all` as |
| 21 | + necessary. |
| 22 | + |
| 23 | +* `git-bundle-server update [--daily|--hourly] <route>`: For the |
| 24 | + repository in the current directory (or the one specified by `<route>`), fetch |
| 25 | + the latest content from the remote and create a new set of bundles and update |
| 26 | + the bundle list. The `--daily` and `--hourly` options allow the scheduler to |
| 27 | + indicate the timing of this instance to indicate if the newest bundle should |
| 28 | + be an "hourly" or "daily" bundle. If `--daily` is specified, then collapse the |
| 29 | + existing hourly bundles into a daily bundle. If there are too many daily |
| 30 | + bundles, then collapse the appropriate number of oldest daily bundles into the |
| 31 | + base bundle. |
| 32 | + |
| 33 | +* `git-bundle-server update-all [<options>]`: For every configured route, run |
| 34 | + `git-bundle-server update <options> <route>`. This is called by the scheduler. |
| 35 | + |
| 36 | +* `git-bundle-server stop <route>`: Stop computing bundles or serving content |
| 37 | + for the repository at the specified `<route>`. The route remains configured in |
| 38 | + case it is reenabled in the future. |
| 39 | + |
| 40 | +* `git-bundle-server start <route>`: Start computing bundles and serving content |
| 41 | + for the repository at the specified `<route>`. This does not update the |
| 42 | + content immediately, but adds it back to the scheduler. |
| 43 | + |
| 44 | +* `git-bundle-server delete <route>`: Remove the configuration for the given |
| 45 | + `<route>` and delete its repository data. |
| 46 | + |
| 47 | +## Web Server Management |
| 48 | + |
| 49 | +Independent of the management of the individual repositories hosted by the |
| 50 | +server, you can manage the web server process itself using these commands: |
| 51 | + |
| 52 | +* `git-bundle-server web-server start`: Start the web server process. |
| 53 | + |
| 54 | +* `git-bundle-server web-server stop`: Stop the web server process. |
| 55 | + |
| 56 | +Finally, if you want to run the web server process directly in your terminal, |
| 57 | +for debugging purposes, then you can run `git-bundle-web-server`. |
0 commit comments