Search code examples
gitrepositoryorganization

How to create folders for branches in a repository?


How can I create a folder for my branches in my repository to keep the list of branches in origin from getting too long. A folder would at least allow these to become collapsible and can help with group branches by type for features, bugs, release and hotfix.


Solution

  • You can prefix the branch you want to create with the folder name or branch type you want. For example you can put a feature branch into a feature folder by making the branch name.

    feature/branch_name

    This can be done on multiple levels. For example

    feature/home/create_home_page

    feature/profile/create_add_profile_page

    feature/profile/create_profile_list_page

    This is an example of how the tree will look.

    feature/home

    ->create_home_page

    feature

    -> profile

    -> -> create_add_profile_page

    -> -> create_profile_list_page