1

I have read How to move files from one git repo to another (not a clone), preserving history

My dir:

➜  website git:(master) tree
.
├── README.md
├── sub-dir-1
│   ├── file1
│   └── file2
├── sub-dir-2
│   └── file3

I can move sub-dir-1 to another repo and save its git history log.

But I want to move README.md to another repo which save git history log, because README.md is old repo root file which isn't sub dir.

So, how should I do? thanks!

EDIT: solved according to Splitting a set of files within a git repo into their own repository, preserving relevant history

thinkerou
  • 1,781
  • 5
  • 17
  • 28
  • The funny thing is a directory doesn't have history. The repo itself _is_ the history. In my mind you could fork the repo and then make changes to it, but I don't think it's possible to extract a folder and keep "it's history". – evolutionxbox Mar 03 '19 at 11:01
  • 1
    Possible duplicate of [Splitting a set of files within a git repo into their own repository, preserving relevant history](https://stackoverflow.com/questions/5998987/splitting-a-set-of-files-within-a-git-repo-into-their-own-repository-preserving) – thinkerou Mar 03 '19 at 14:41

0 Answers0