Search code examples
gitgithubversion-controlgitlabversioning

difference between git pull --rebase and git rebase branch


what is the difference between

  • git pull --rebase
  • git rebase origin/nameOfBranch

and when must use one over the other


Solution

  • The difference is that git pull does two things:

    • fetch and
    • merge (or rebase, since you give it the --rebase argument)

    On the other hand, git rebase does only the rebase, not the fetch.