What is a base branch? #4348
-
Hi, I'm a bit confused about the concept of a base branch in lazygit.
The reason I ask is that in my case, I see I'd appreciate any clarification on this! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The base branch is not the upstream branch; it is the branch that your feature branch was supposedly branched off of, and will probably be merged back into. It's a heuristic, lazygit can only guess which branch this is. It uses the concept of "main branches" for this heuristic (and picks the closest one of those); these are "master" and "main" by default, but you can change this with the To see which branch lazygit considers to be the base branch of a given feature branch, press Let me know if some of this is still not clear. |
Beta Was this translation helpful? Give feedback.
The base branch is not the upstream branch; it is the branch that your feature branch was supposedly branched off of, and will probably be merged back into. It's a heuristic, lazygit can only guess which branch this is. It uses the concept of "main branches" for this heuristic (and picks the closest one of those); these are "master" and "main" by default, but you can change this with the
git.mainBranches
config.To see which branch lazygit considers to be the base branch of a given feature branch, press
u
on it; the menu item "View divergence from base branch" shows in parentheses which one it is. Invoking this command also shows in more detail how far ahead and/or behind you are from the…