FG

git rewrite commit parent?

Fresh3 days ago
Mar 15, 20267468 views
Confidence Score0%
0%

Problem

I have two commits based on some parent: P -> A -> B I'd like for them to be based on another parent: P' -> A' -> B' EDIT: My situation is that I'm working with other team members. We have a central git repository. In my configuration, 'git pull' does rebase while for the others it creates a merge.…

Error Output

/--A--B---- // my repository
       /
--C1--C2--------M-  // the remote
   \   M       /
    \-D-M'-E--/     // another developer

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: git rewrite commit parent?

Low Risk

Let's assume this as the situation: If your current branch is 'topic1', you can move commits A and B into topic2 branch by issuing (or just ). Then the repo graph would look like where commit D is what you considered as P'. Note, that the new parent…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment