how do you change the parent branch in git?
Here is my current git graph:
I mistakenly though I was branching out of the last commit on main. but I instead branched out of
branchA
.
I don't wanna go through removing the branchA
changes from every single file on branchB
.
Is there a way to "rebase" the branchB - c1
on main - c2
without doing it the hard way?15 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
execute my noobish question.
it worked(in a scary way) thank you
I've lost the commit in the second argument. I just realized that after deleting the bkp
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes c1 in branchB
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I guess I'll try to restore the filesystem somehow. I didn't even use trash, I deleted right away
this says it should've worked
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no worries it's a small feature. thank god I do atomic commits.
yh I just read it here.
thanks though for your time
I'm not sure but I think the commit could be just dereferenced. is there a way to list all un referenced commits?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I already did. but it's a detached head. how do I reference it back from the common commit.
I was able to
diff
and it turns out that I've changed a lot in that commit 😆oh they just told me how to do so.
fixed