79777006

Date: 2025-09-27 21:12:26
Score: 1
Natty:
Report link

Do you also want to copy the .git history to be copied to your new repo or only the code files?

I suppose u want to you to copy the .git history too( tags, branches, commits) , use --bare flag while cloning to get just the .git history and then use the --mirror flag while pushing to the new repo which also regenerates the code files:

git clone --bare https://github.com/owner/repo1.git
cd repo1.git 
git push --mirror https://github.com/you/repo2.git
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: devRito