0

We have the below branch structure in git repository. I know how to find the specific files in git repository matching some pattern. But I'm not able to find the command which would give me - e.g. (BranchStatDir_N is created in BranchDev02 branch which is in master branch)

> master
> > > > ---BranchDev01
> > > > > > > > --BranchDir_1

> > > > > > > > --BranchDir_2

> > > > > > > > --BranchDir_3

> > > > > > > > -- ....

> > > > > > > > -- ....

> > > > > > > > --BranchDir_N

> > > > ---BranchDev02

> > > > > > > > --01XXXStatDir_1

> > > > > > > > --02YYYStatDir_2

> > > > > > > > --03ZZZStatDir_3

> > > > > > > > -- ....

> > > > > > > > -- ....

> > > > > > > > --BranchStatDir_N

> > > > ---BranchDev03

> > > > > > > > --6ed.BranchModeDir_1

> > > > > > > > --MAK.BranchModeDir_2

> > > > > > > > --RKenBranchModeDir_3

> > > > > > > > -- ....

> > > > > > > > -- ....

> > > > > > > > --BranchModeDir_N

Given a directory, how can I find a specific directory in the Git repository, walking down all directories recursively? Is there any way we can walk through the specific directory in git repository structure under all branches?

Braiam
  • 1
  • 11
  • 47
  • 78

1 Answers1

1

You are mixing up branches and folders. The former is not the latter (contrary to Subversion, where branches and tags are folders)

And branches are not "structured" that way: a branch can be rebased/renamed/reset at any time.
See "Find the parent branch of a git branch"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250