gitup
一款用于使用 Git™ 备份客户端和服务器的 Minecraft 模组。
Git 及 Git 徽标是 Software Freedom Conservancy 的商标。本项目独立运作,与 Git 或 Git 项目没有任何关联。
Gitup 依赖于已安装并配置在用户 PATH 环境变量中的 Git CLI,并且要求游戏实例已经配置了一个具有推送权限的 Git 仓库。所有凭据均由 Git CLI 本身处理,Gitup 不会读取或存储任何凭据。所有网络访问均通过针对该仓库已配置的 Git 命令完成。
使用方法
- 将 .jar 文件安装到你的 mods/ 目录中
- 启动游戏,然后在 mods/gitup.json 中配置模组
配置
Gitup 支持在 gitup.json 中进行以下选项设置:
- extraArgs.fetch: 在向 Gitup 调用 git fetch 时添加额外参数。
- extraArgs.pull: 在向 Gitup 调用 git pull 时添加额外参数。
- extraArgs.add: 在向 Gitup 调用 git add 时添加额外参数。
- extraArgs.commit: 在向 Gitup 调用 git commit 时添加额外参数。
- extraArgs.push: 在向 Gitup 调用 git push 时添加额外参数。
- extraArgs.diff_index: 在向 Gitup 调用 git diff-index 时添加额外参数。
- pushInterval: Gitup 尝试创建备份的频率。0 = 禁用。
- pushIntervalUnit: pushInterval 选项所使用的单位。目前支持 SECONDS(秒)、MINUTES(分钟)、HOURS(小时)、DAYS(天)、WEEKS(周)和 YEARS(年)。
- commitMessageFormat: 用于 git commit 消息的文本格式。此选项支持 Java DateTimeFormatter 格式。
- lastPushTimestamp: 上次备份的时间戳。大多数用户通常应忽略此选项。
依赖项
- Cloth Config API
- Fabric API
未来功能
- 当出现重复的游戏崩溃时,自动执行可配置的 git pull 或 git reset
gitup
A Minecraft mod used for backing up clients and servers using Git™.
Git and the Git logo are trademarks of the Software Freedom Conservancy.
This project is independent and is not associated with Git or the Git project in any way.
Gitup depends on the Git CLI being installed and on the user's PATH, and also requires for the game instance to have an already configured Git repo with push privledges. All credentials are handled by the Git CLI itself and is not read or stored by Gitup. All network access comes from Git commands using the repos already configured for that repository.
How to use
- Install the .jar file to your mods/ directory
- Start the game, then configure the mod in mods/gitup.json
Configuration
Gitup supports the following options in gitup.json:
- extraArgs.fetch: Add extra flags to when Gitup invokes git fetch.
- extraArgs.pull: Add extra flags to when Gitup invokes git pull.
- extraArgs.add: Add extra flags to when Gitup invokes git add.
- extraArgs.commit: Add extra flags to when Gitup invokes git commit.
- extraArgs.push: Add extra flags to when Gitup invokes git push.
- extraArgs.diff_index: Add extra flags to when Gitup invokes git diff-index.
- pushInterval: How often Gitup should attempt to create a backup. 0 = disable.
- pushIntervalUnit: What unit the pushInterval option is in. SECONDS, MINUTES, HOURS, DAYS, WEEKS, and YEARS are currently supported.
- commitMessageFormat: The text format to be used in the message of git commit. This option supports Java DateTimeFormatter formats.
- lastPushTimestamp: The timestamp of the last backup. Should generally be ignored by most users.
Dependencies
- Cloth Config API
- Fabric API
Future features
- An automatic configurable git pull or git reset when there are repeated game crashes
评论 0
登录后参与评分
还没有评论,来抢沙发吧