Difference between git pull and git pull --rebase


I started using git sometime back and do not fully understand the intricacies. My basic question here is to find out the difference between a git pull and git pull --rebase , since adding the --rebase option does not seem to do something very different : just does a pull.

Please help me with understanding the difference.


git pull = git fetch + git merge against tracking upstream branch

git pull --rebase = git fetch + git rebase against tracking upstream branch

If you want to know how git merge and git rebase differ, read this.

How to 'git pull' without switching branches (git checkout)?

How to create file execute mode permissions in Git on Windows?