Suppose I have the following commits on my local branch A, which I then push to the remote branch.
commit 1
commit 2
commit 3
commit 4
Now, I pull from the remote master, and the commit history looks like this -
//From branch A
commit 1
commit 2
commit 3
commit 4
//From master
commit 5
commit 6
If I now want to squash commits 2 and 3 using git rebase -i and git push -f, will that rewrite commits 5 and 6 as well? If yes, is there a way I can squash my earlier commits without rewriting the commits I pulled from the master branch? I'm new to Git, so please excuse me if I'm missing something very basic.