I have a bitbucket git repository which has two big folders (Folder1 and Folder2) with huge and important commit history inside. I want to create two new folders (NewParentFolder1 and NewParentFolder2) and move these two folders into their new respective parents.
Most Importantly: Not losing both folders original commit history
Current directory structure:
Project1->
- Folder1
- Folder2
- otherFolders
- otherFiles
- .gitignore
Desired directory structure:
Project1->
- NewParentFolder1
- Folder1
- NewParentFolder2
- Folder2
- otherFolders
- otherFiles
- .gitignore
Thanks, in advance.
git log NewParentFolder1/Folder1will not show all commits, even with--follow.git filter-repo --path-rename Folder1:NewParentFolder1/Folder1 --path-rename Folder2:NewParentFolder2/Folder2Must be done in a clean clone; or create a backup and use--force. Found in stackoverflow.com/search?q=%5Bgit-filter-repo%5D+move+directory