Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git rebase getting invalid upstream

Tags:

git

I did the following:

git fetch --all

git checkout -b my-feature-branch master

// did some edits

git commit -m "some commit comments"

git rebase another-branch

I get git error: "invalid upstream 'another-branch'

I can see the 'another-branch' on the remote so I am not sure what is happening. Any help is really appreciated.

like image 894
F. K. Avatar asked Sep 07 '25 04:09

F. K.


1 Answers

You need to checkout 'another-branch' locally before rebasing it.

git checkout -b another-branch origin/another-branch

Or, you need to pull all the branch after fetching

git pull --all
like image 134
Abimaran Kugathasan Avatar answered Sep 09 '25 03:09

Abimaran Kugathasan