Is there any way or any tool or commands to re write the history of master
or some A
branch from some commit number to newly created master
branch of NEW REPOSITORY with master
branch with 0 commits or no history.
In such a way that :
Thanks
(I don't have a suitable sacrificial repository to test this: you've been warned).
I would think merge --squash
could do this.
Merge --squash
from your source branch(See this answer as well.)
Old Content (before question edit)
Just create the new repository as a new remote on your clone of the original repository; and then push to the new repository.
git remote add newrep url-to-new-repository
git push -u newrep master
Repeat the last command for each branch you want to push.