0

I am working on a Python project with git that was recently restructured to be distributed as a Python package using setuptools. Unfortunately, not all branches were restructured, and I need to rebase some commits from an unmodified branch to the one with the correct structure. Git won't do this automatically, so how do I do this properly?

For example:

The old setup was:

A/
B/
C/
D/

The new setup is:

A/
E/
|--__init__.py
|--B/
|--C/
|--D/
F/
setup.py

Where B, C, and D all contain Python files to be included in the package.

Thank you!

  • Possible duplicate of [Git rebase with renamed files](https://stackoverflow.com/questions/42568138/git-rebase-with-renamed-files) – Greg Burghardt Aug 06 '19 at 19:19
  • See https://stackoverflow.com/q/42568138/1256452 (as in Greg Burghardt's comment). Remember that rebase is (in effect) repeated cherry-pick, and each cherry-pick is (in effect) a merge. So for each commit that you're going to merge/pick you must enable rename-finding at a level at which it finds the appropriate renames. – torek Aug 06 '19 at 20:08

0 Answers0