Why can I not rebase from the same location that I can pull? For example, if I am in a pository I can pull from another repository:
git pull /path/to/other
But I cannot rebase from that other repository; the following fails:
git rebase /path/to/other
The help for rebase doesn't mention any refspec's, so I don't know how, or even if, I can/should specify them.
How can I rebase from a different location?
That's because git pull and git rebase do completely different things.
What git pull does:
What git rebase does:
(In both cases, those are just the defaults.)
The main difference is that git pull operates on remote repositories, while git rebase operates on branches. That's why git rebase /path/to/other doesn't work, /path/to/other is not a branch.
But if you want to do what git pull does, except you want to do rebase instead of merge, you can do that: use git pull --rebase.
git pull --rebase /path/to/other
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With