Leandro Castro
Leandro Castro

Reputation: 251

Some commits are on two branches. Why?

I have two branches: Voip and Elastic. In some commits are showing "2 branches". Why this happens?

My Commits

Upvotes: 3

Views: 1142

Answers (2)

natz
natz

Reputation: 731

This happens typically when changes have been merged from a branch into another.

The commits will appear on both the branches,So if you had ever:

  1. merged voip into elastic
  2. Created voip from elastic

Or similar situations.

And like RomainValeri has mentioned it is nothing to worry about. In fact it gives a way to trace back commit, via the path.

Upvotes: 2

Romain Valeri
Romain Valeri

Reputation: 21938

It means that 2 branches "have" this commit, or to rephrase it in git terms, that this commit is reachable through 2 branches.

Nothing unusual or problematic per se.

Example :

A---B---C <<< branch1
     \
      D---E <<< branch2

Here, both A and B would feature the same "2 branches" mention.

(You could, for the sake of the experiment, create a new branch at B, and then observe the mention "3 branches" on A and B.)

Upvotes: 3

Related Questions