I have two branches:
1. master
2. tmp
tmp branch is detached
I need to put tmp branch on top of master with resolving conflicts in priority of tmp ?
I have two branches:
1. master
2. tmp
tmp branch is detached
I need to put tmp branch on top of master with resolving conflicts in priority of tmp ?
The term "detached" is generally reserved to "detached HEAD", where you have no branch name referencing a commit.
If you have a branch named "tmp
", it isn't really detached.
The only interpretation I see for this "detached" state would be:
x--x--x (master)
\
y--y (b1)
\
z--z--z (tmp)
(Here, tmp
could be considered "detached" from master
, as it doesn't directly stem from master, but from b1
)
In which case, a rebase would look like
git checkout tmp
git rebase --onto master b1 tmp
In any case, you can pass a merge strategy to git rebase
in order to resolve any conflict in favor of tmp content (as I mention in "Selecting merge strategy options for git rebase"):
git rebase -s recursive -X theirs