Will the history/commits of experimental be updated by the rebase on the local master branch?
The answer is no. Performing a normal git pull
on master is the same as performing these two commands... (assuming origin
is the remote, and your on the master
branch)
git fetch
git merge origin/master
When you add the --rebase
flag, it changes the pull to perform these two commands instead...
git fetch
git rebase origin/master
As you can see, the rebase performed is a simple rebase with no additional references. This is a shorthand, git assumes the current branch as a second parameter. When a rebase is performed this way while on master
, it is assumed to mean this...
git rebase origin/master master
The above could be performed from any branch or even a headless state, and it would still result in the same thing as simple using git rebase origin/master
, because that second parameter is target reference. To quote the documentation...
git rebase master
git rebase master topic
NOTE: The latter form is just a short-hand of git checkout topic
followed by git rebase master. When rebase exits topic will remain the
checked-out branch.
Obviously since the current branch is assumed to be the target of the rebase, there is no chance of this effecting other branches.
As a general rule, git wont do anything to all your branches.
Your second question
Unfortunatly, I'm having trouble following your scenario. I ask that you either break it up into smaller questions, simplify it to the core of what your trying to understand. Additionally, you might want to create a simple text diagram of the commit history in your scenario similar to what was done on this question.
I think this is the crucial part that needs clarification...
"Now I rebase master to be applied on top of the remote..."
We need to understand what you mean by "on top of". Try showing us the series of git commands, in particular this final rebase.
That said, my the answer to the following...
"Will my local dev branch now include the (previously remote-only) commit history that I now see in my master branch?"
... is likely to be yes. After rebasing from anywhere into master, you will then see the commits on master that used to be only on the place you rebased from.