I am creating a new version of a project that I have no rights. Unfortunately I started making my changes (more than 20 local commits) and realized my mistake when I wanted to push my changes.
For example I am working with ProjectA
on branch local
with the unpushed, local commits, can I transfer the entire local
branch to a new ProjectB
as master
?
I know that I can just contact the developer of the original project to give me temporary rights to solve my problem. However I am curious if there is an existing way to do this with just Git commands.
I have already found:
- "How do I create a new GitHub repo from a branch in an existing repo?" - requires pushed commits
- "How do I move local, unpushed, commits from a corrupt git repository to another repository?" - I need the history of my local branch, not just the patch