I'm currently searching for best practices or experiences regarding the change of the directory structure in a git repository.
The problem: I need to move a lot of files while the rest of my team is working on those. When those branch are merged (probably beginning with the directory structure change), a lot of conflicts are reported.
Example: All code originates from main.
- A colleague create a first branch
work_afrommain. - I create a second branch
structure_changefrommain. I change the structure from this:
a/
b/
b1/
file1.go
file2.go
b2/
file3.go
c/
c1/
file4.go
c2/
file5.go
file6.go
to this (moving content of c to b):
a/
b/
b1/
file1.go
file2.go
b2/
file3.go
c1/
file4.go
c2/
file5.go
file6.go
- Another colleague create a third branch
work_bfrommain. - I merge my branch
structure_changetomain. No Issues, history is kept. work_ais merged inmain-> Merge Conflict on the directories and subdirectories ofc/.work_bis merged inmain-> Merge Conflict on the directories and subdirectories ofc/.
I need to change the structure, but I would prefer to have as little impact as possible.
Any ideas or suggestions ? Maybe experiences doing the same operation ?