移动分支时jgit中的setStartPoint是什么意思?

what is the meaning of setStartPoint in jgit when you move branch?

我创建了两个起点为 origin/master 的分支 当我用起点参数检查分支(在分支之间移动)时,它有什么意义吗? 如果我在结帐分支时移动或不移动参数 startPoint 会发生什么?

您可以看到 setStartPoint 用于 createBranch (also in this example)

    Ref ref = git.branchCreate().setName("testbranch").setStartPoint("origin/testbranch").call();

您还可以在检出命令上设置起点,当您想要检出的不是分支的 HEAD,而是之前的提交时。
Example:

    CheckoutCommand co = git.checkout();
    File test = writeTrashFile(FILE1, "");
    File test2 = writeTrashFile(FILE2, "");
    co.setStartPoint("HEAD~2").addPath(FILE1).addPath(FILE2).call();

What happened if I move or not moved the parameter startPoint when I checkout branches

您将检出 HEAD(未指定起始点)或者您将从已检出的分支检出另一个提交。