1

TLDR: upgrade a directory to new repo maintaining .git info.

I have a existing repo with a DirectoryOfInterest as - https://github.com/username/existing_repo/blah1/blah2/DirectoryOfInterest

I want to create this - https://github.com/username/new_repo/DirectoryOfInterest

So far I have created new_repo. I can download DirectoryOfInterest and then upload files into new_repo.

To help people with similar questions how can we (three questions):

  1. Delete DirectoryOfInterest from existing_repo and move to new_repo (cut & paste)
  2. Copy DirectoryOfInterest from existing_repo to new_repo without the ability to sync DirectoryOfInterest (Copy & Past)
  3. sync DirectoryOfInterest at existing_repo and at new_repo with sync (think DropBox / OneDrive type sync)

While maintaining the history (.git) and not having to write a porting script in python or some other language.

I am new to version control - please be gentle. Thanks

I have seen: Download Directory

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • Have you looked at this? [Importing a repository with GitHub Importer](https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer) – ObjectJosh Dec 01 '21 at 05:18
  • See https://stackoverflow.com/q/359424/7976758 – phd Dec 01 '21 at 12:09
  • Git stores *commits*, not files; you're talking about *directories* (which contain files), so you're already kind of in trouble here. Those three questions have very different answers, but there's one thing that is guaranteed: unless you copy the *commits* (which *are* the history in a repository), you new repository will have a different, incompatible history. – torek Dec 01 '21 at 12:32

0 Answers0