I had a pretty sucky thing happen to me today: while remote tracking a
non-master branch, I force pushed. This had the intended effect of force
pushing the branch I was working on, but also the unintended function of force
pushing all branches I wasn't on.
I'm open to anyone's thoughts about this (or even a suggestion as to how to
avoid this in the future), but as far as I know, in 99% of cases, a developer
does not intend to force push all branches he is remote tracking on his system
when he types `git push -f`. Now I know that that's what will happen, but I
wonder why git does this (and, furthermore, why git doesn't prevent force
pushing multiple branches at once.)
Again, I think the case where one intends to force push many branches is
certainly not as common as the case where one intends to force push one branch,
so why does git's default behavior leave the user in the position of fscking
himself over pretty badly?
Would love any thoughts or suggestions on this.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html