Skip to main content
100%

How to make git repo to be another's repo subfolder preserving history

✓ Published0🌍 Public
RRestuta
Last edited Jan 8, 2015
Created on Jan 7, 2015

This example shows a multi-step Git workflow for relocating an existing repository (`Proto`) into a subfolder of another repository (`Main`) while preserving full commit history. It demonstrates the use of `git checkout --orphan`, `git rebase`, and the history-rewriting command `git filter-branch --tree-filter` to move all files into `SRC/proto` across every prior commit. The process also addresses hidden files (like `.editorconfig`) and explains how to merge the two repositories via `git remote add` and a final `git rebase`. The source is a plain-text markdown guide with shell commands.

AI-generated description

Similar vizzes