问题
GitHub's UI is fairly unintuitive and poorly thought-out, so here's a problem and a question:
What is the "head" repo? What is the "base" repo? I do not know which one is being copied from. The words "base" and "head" mean the same thing. The "head" of a linked list is similar to the "base" of a tree. (GitHub has fork tree and file tree.) "Head" and "base" are synonyms and mean the "start" of a data structure, so these labels are ambiguous.
Despite the arrow in the diagram, it is not apparent which repo is being copied from and which is copied to. They really should have included a "To" and "From" label to clear this up. The word "compare" does not imply directionality. This is really REALLY stupid wording. The arrow could mean "X into Y", or it could mean "Y into X".
回答1:
The terms "head" and "base" are used as they normally are in Git. The head is the branch which you are on; that is, the branch with your changes. The base is the branch off which these changes are based. This is similar to the terminology used for git rebase
and git merge-base
.
For example, if I'm comparing changes I've made on my foo123
branch against the main Git repository, the base branch is the master
branch of git/git
, and the head branch is the foo123
branch of bk2204/git
. I would be proposing merging my changes on my foo123
branch into the main Git master
branch if I opened a pull request.
来源:https://stackoverflow.com/questions/58965087/what-are-base-and-head-repo-in-github-web-ui