Search code examples
pythongitgithubrepository

Replace content of repo


I have a repo on GitHub with a software written in one language, but I have decided to convert (reprogram) to another language (Python). The structure of the program will thus be different and in principle everything is replaced. When the first version of the new program is ready I would like to continue with the same repo-name to keep the same url-link. I'd also like to keep the old code available for reference, but maybe as an archived repo with another name. So far I have been the only contributor to the project.

Will this plan work:

  • if current repo is called 'my_repo'
  • Rename current repo to 'my_repo_old'
  • Create new 'my_repo' with the new code

Does this sound as the correct way to do this? Is there any pitfalls here? Would you recommend another approach?

Thankful for any advise.


Solution

  • Yes, that looks correct. You can also make a organization, fork your code there, and push your python code to old repo that way both project can have same name but will be under different url but still tied to your account.