gitgit-rebasegit-revision

Git: difference between "git rebase origin/branch" and "git rebase origin branch"


Does anyone know what is the difference? Seems to me, it is the same. But when I run it, it didn't do the same thing:

git rebase origin/branch - ok rebases from remote branch

git rebase origin branch - makes conflicts


Solution

  • git rebase <upstream> <branch>
    

    is equal to

    git checkout <branch>
    git rebase <upstream>
    

    By default <branch> is HEAD.

    [1] https://www.kernel.org/pub/software/scm/git/docs/git-rebase.html