在 Visual Studio 2015 年同步时使用 rebase

Use rebase when Sync in Visual Studio 2015

我正在使用 Visual Studio 2015 和 Git。当我需要推送我的提交时,我使用 fetch 和 rebase 在推送之前合并新的提交。这是我公司的默认策略,可以在不合并合并的情况下保持历史清晰。

是否可以将 Visual Studio 2015 Team Explorer 的同步功能配置为在拉取时使用变基?在 Git 配置中可以设置 pull 以使用 rebase 而不是默认合并,但是 Visual Studio Sync 似乎使用另一个配置。

截至目前,Visual Studio 似乎不支持此功能。

您可以看到参考文献here and here

... For now Visual Studio does a git pull --no-rebase when clicking on pull. Visual Studio should just do a git pull, therefore allowing the user to choose the behavior through the console...

如上引述所示,VS 明确声明同步是 运行 和 --no-rebase 选项。由于存在此显式选项,因此在这些页面上建议使用全局配置设置的注释是不正确的。

您目前只能手动进行变基。