I have a situation where I needed to create a new repository from the existing repository on Github (with different name) but I want to import the log/history as well from the old repository.
Is there a way to do this?
The use-case here is to separate a component from the existing repository by duplicating the repository and prune until we achieved the goal.
This is what that "fork" button (in the upper right of the screen when viewing a repository on GitHub) does. It will create a copy of the repository (which includes the entire history) with another name.
You can also:
git clone
the existing repository to your local filesystem git remote add ...
) git push
your local repository to the new GitHub repository
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.