Skip to content

What is a base branch? #4348

Answered by stefanhaller
samaursa asked this question in Q&A
Mar 1, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@samaursa
Comment options

Answer selected by samaursa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants