配置 Git 和存储库行为
首选项 › General 保存 GitTree 驱动 Git 的方式:Git executable、Pull mode、Auto-fetch interval、变基选项、Long paths 和 Line endings。 Repo-Specific Preferences 会覆盖一个存储库的其中一些,例如其 Base branch、自动获取、提交模板以及它如何通知文件更改。
免费使用 GitTree:登录后的所有本地 Git 功能。
开始之前
- 安装了 Git 2.39 或更高版本(设置 Git)。
在哪里可以找到它
- 首选项 › General;首选项 › Repo-Specific Preferences › 您的存储库。
| 行动 | macOS | Windows 和 Linux |
|---|---|---|
| 偏好设置 | ⌘, | Ctrl+, |
步骤
选择 Git 程序
将 Git executable 留空以自动查找 Git,或提供要使用的路径。
决定 Pull 做什么
将 Pull mode 设置为 Fast-forward only、Fast-forward if possible, else merge 或 Rebase。变基保留旧提示,撤消则恢复它。
设置变基选项
Rebase: stash local changes、Rebase: move stacked branches 和 Interactive rebase: arrange fixup! commits 可以遵循 git config(继承)或在此处设置。
覆盖一个存储库
在 Repo-Specific Preferences 中,设置其 Base branch、Auto-fetch interval(-1 跟随应用程序)、Commit message template 或 Notice file changes by。
预期结果
GitTree 运行您选择的 Git,按照您设置的方式拉取和变基,每个存储库可能有所不同。
早期预警
- Warn about conflicts before merging:在获取之后,指示哪些文件将与上游和基础分支冲突。它什么也改变不了。
- Show overlapping work:标记您正在更改的文件,提取的未合并分支也会更改。
如果出现问题
在 GitTree 外部所做的更改会较晚出现在网络共享或 WSL 中
将该存储库的 Notice file changes by 设置为 Checking every few seconds。
问题
GitTree 是否会更改我的 git 配置?
只有命名 git 键的设置(例如 Long paths (core.longpaths) 或 Line endings (core.autocrlf))才会写入它,并且仅在您更改它们时才写入。