I still don't get what exactly happens with git pull --rebase. I understand the rebasing concept and I have used it in my own local unpublished branch, never when my branch is already published in the remote. I've heard the dangers of doing a rebase with remote, and looking at git pull --rebase, I don't quite grasp how this is safe or when it is unsafe to do so.
Say for example I am working on MyBranch branch and have been pushing it to the remote so that it gets stored somewhere else other than my own local machine (and probably other people will merge my changes to keep development in sync).
a--b--c--d--g--h (master, origin/master)
\
e--f--i (MyBranch, origin/MyBranch)
Say I do some local development
a--b--c--d--g--h (master, origin/master)
\
e--f--i (origin/MyBranch)--j--k--l (MyBranch)
Say someone else updates MyBranch with the development that has gone into master.
a--b--c--d--g--h (master, origin/master)
\ \
e--f--i---m( origin/MyBranch)
\
j--k--l(MyBranch)
If I then update by pulling git pull --rebase, how would my tree looks like? Will it only rewrite the history of j, k, l (those local to mine) and put it on top of m, or will it rewrite other history that is already on the remote branch?
What exactly is the rebase start point and which is the replays?
Also if origin/MyBranch is being merged into other upstream branch like "develop" then what are the implications of my rebase?
a--b--c--d--g--h (master, origin/master) --n --o --p (origin/develop)
\ \ /
e--f--i---m( origin/MyBranch)--------------
\
j--k--l(MyBranch)