Thanks to David Barr and Jakub Narebski. Finally I found the way based on your hints to solve my problem. $ git checkout -b test --orphan $ git format-patch <newroot>^..<newroot> | git am $ git rebase -i --onto test --root master $ git branch -M test master Please let me know if there is more simple way. 2012년 3월 17일 오후 11:26, Jakub Narebski <jnareb@xxxxxxxxx>님의 말: > semtlenori@xxxxxxxxx writes: > >> Sometimes, I need to reorder all commits, which include the initial >> commit, in my branch. >> So I tried it using git-rebase as follows, but it failed with the fatal error. >> >> (supposing the initial commit is 793ea88) >> $ git rebase -i 793ea88^ >> fatal: Needed a single revision >> invalid upstream 793ea88^ >> >> How can I do that? > > Use `--root` option. > > -- > Jakub Narebski > -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html