Reputation: 9782
I am working on a Ruby project with a friend who has "collaborator" privileges in my Github.
git rebase -i origin
master
.The git rebase -i origin master
command threw me the following error:
devil@DEVil:~/repos/ruby_bank$ git rebase -i origin master
fatal: Needed a single revision
invalid upstream origin
There are other questions on S.O. this error, but none of them quite meet the criteria of this problem.
Upvotes: 11
Views: 21792
Reputation: 1031
The error is telling that git-rebase expects only one referente, not two. And origin is not a reference.
You forgot the slash between origin and master.
git rebase -i origin/master
You can have several branches. Then the slash is telling git which branch of the repository is the one you want to rebase.
When you want to do a rebase of your own repository you only need to write the branch or reference without telling any repository.
Upvotes: 10