git rebase does not understand --work-tree
- From
Alexander Gladysh <agladysh@gmail.com>
- Date
- Jul 14, 2010, 09:04 UTC
- Message-ID
- <AANLkTimnk6tflv9ZZCydlX1la35GjsRfvjgTk44uDFbO@mail.gmail.com>
Hi, list!
$ git --version git version 1.7.1.1
I often use --work-tree and --git-dir to avoid doing cd in my scripts.
However, I've found that git rebase does not understand --work-tree option (see test below). Is this fixable?
Thanks, Alexander.
mkdir tmp cd tmp git init echo "test">file.txt git add . git commit -m "initial commit"
git checkout -b other-branch echo "test2">otherfile.txt git add . git commit -m "second commit"
cd .. git --git-dir=tmp/.git --work-tree=tmp rebase other-branch
fatal: /usr/local/libexec/git-core/git-rebase cannot be used without a working tree.