Home > Software engineering >  I created a new branch but for some reason GitHub is showing 2
I created a new branch but for some reason GitHub is showing 2

Time:12-25

I added a new branch but for some reason it created a duplicate is this a normal behavior or should I be concerned ?

enter image description here

I used

git branch PayloadGenerators
git checkout PayloadGenerators
git add .
git push origin PayloadGenerators

CodePudding user response:

GitHub makes a distinction between a "branch" and an "active branch".1 The GitHub web page displays (a) some of your branch names, and (b) some "active" branches. If you have one non-default branch and GitHub considers it "active", you will see it twice, so this is entirely normal.


1An "active branch" is, according to the GitHub documentation, one where:

... anyone has committed to within the last three months, ordered by the branches with the most recent commits first.

Note that Git itself makes no such distinction, but it doesn't really matter, since branch names in Git are entirely unimportant (except, perhaps, to you, if you're a human).

  • Related