Reputation:
I have cloned a repository to download the code, now I want to work on it and save it in my own private repository on GitHub. I don't want to contribute to the original project or submit changes or anything, it's just a personal project. When I try to do this, however, my git isn't working because I think it's already associated with the repository that I did the clone command from. How do I properly do what I'm talking about?
Upvotes: 2
Views: 4637
Reputation: 1328712
Instead of deleting the .git
(which removes the history of past commits), you can simply change the origin
and point it to a new GitHub repository that you have first created.
git remote set-url origin https://github.com/me/myNewEmptyRepository
git push --mirror
That way, you have a full copy of the original repository, without making a fork.
You can then change it as you need.
Upvotes: 5