How to rebase the following commits?

I have:
A---B---C  orig
D---E---F  dev

I would like to rebase dev over orig branch, so I have the following result:
A---B---C---D---E---F


I tried this:
git rebase orig dev

But the result the following.
A---B---C  orig
            \
             E---F  dev

The initial commit named as "D" is missing.


I tried this:
$ git checkout orig
$ git rebase --root -v dev
Changes from  to 9ab1c4999ca54f068a04fe116f23676ba9388ed7:
fatal: ambiguous argument '': unknown revision or path not in the working 
tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Switched to branch 'dev'
Note: checking out '9ab1c4999ca54f068a04fe116f23676ba9388ed7'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 9ab1c49...
Rebasing (1/3)
dbdf75f50b4eb08c23b90bf03488cc61de6cd9fd
Rebasing (2/3)
69eabea744f42990089aaf1334381e455a680bbe
[detached HEAD 39b8b7f] E
 Date: Wed Jun 24 17:27:28 2015 +0200
 1 file changed, 1 insertion(+)
 create mode 100644 file2
Rebasing (3/3)
4f9a02e3d0ff854e4190575192c824712028d085
[detached HEAD e804aa2] F
 Date: Wed Jun 24 17:30:40 2015 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/dev.

The result is:
A---B---C  orig
D---E---F  dev


Another way:
$ git rebase -v --onto orig --root dev
Changes from  to 61ef11b64bae2695425c1dee47566b987076ed91:
fatal: ambiguous argument '': unknown revision or path not in the working 
tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
First, rewinding head to replay your work on top of it...
Applying: E
Applying: F

The result is:
A---B---C  orig
            \ 
              E---F  dev
Still missing the "D" root of dev.


What I do wrong?


Thanks,
Konrad

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to