The self-assembly of fibrils is a subject of intense interest, primarily due to its relevance to the formation of pathological structures. Some fibrils develop branches via the so-called secondary nucleation. In this paper, we use the master equation approach to model the kinetics of formation of branched fibrils. In our model, a branched fibril consists of one mother branch and several daughter branches. We consider five basic processes of fibril formation, namely, nucleation, elongation, branching, fragmentation, and dissociation of the primary nucleus of fibrils into free monomers. Our main focus is on the effect of the directionality of growth on the kinetics of fibril formation. We consider several cases. At first, the mother branch may elongate from one or from both ends, while the daughter branch elongates only from one end. We also study the case of branched fibrils with bidirectionally growing daughter branches, tangentially to the main stem, which resembles the intertwining process. We derive a set of ordinary differential equations for the moments of the number concentration of fibrils, which can be solved numerically. Assuming that the primary nucleus of fibrils dissociates with the fragmentation rate, in the limit of the zero branching rate, our model reproduces the results of a previous model that considers only the three basic processes of nucleation, elongation, and fragmentation. We also use the experimental parameters for the fibril formation of Huntingtin fragments to investigate the effect of unidirectional vs bidirectional elongation of the filaments on the kinetics of fibrillogenesis.