Allan Xu
Allan Xu

Reputation: 9378

Is there any way to have a hierarchy (folder) view of branches?

This article suggests options for how to organize git branches:

https://dev.to/hardkoded/how-to-organize-your-git-branches-4dci

enter image description here

Is there any way to have a hierarchy view of branches in Github?

In AzureDevOps we can use "/" and get a folder view. Not sure how to do it in GitHub

Update # 1

The focus of this question is GitHub Web UI. There are many tools that show folder view, but I need to do the same in GitHub UI.

We have many team members and they like to have their own branches each.

There are so many braches listed in the branch drop down.

enter image description here

Upvotes: 3

Views: 978

Answers (1)

VonC
VonC

Reputation: 1330102

Azure TFVC (Team Foundation Version Control) has the notion of Folder and Branch

https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/media/branch-folders-files/ic277127.png?view=azure-devops

There is no such notion with Git, where branches are:

  • the HEADs of a graph of commits
  • transient (they can be renamed/moved/deleted at any time)

If you really need to have one branch per folder, you would use git worktree.


The focus of this question is GitHub Web UI.

There would not be a Web UI component in GitHub which would allow to sort branches by "folders".

If there are too many branches, I would suggest to spread them accross multiple repositories, each one created from a common history, and with their own set of branches.

Upvotes: 1

Related Questions