All of lore.kernel.org
 help / color / mirror / Atom feed
* Feature request: prevent push -f from pushing all branches at once
@ 2013-07-03 23:30 Dany
  2013-07-03 23:38 ` Jonathan Nieder
  2013-07-04  8:06 ` Matthieu Moy
  0 siblings, 2 replies; 3+ messages in thread
From: Dany @ 2013-07-03 23:30 UTC (permalink / raw)
  To: git

Hi,

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.

Thanks,
--Dany.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-04  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 23:30 Feature request: prevent push -f from pushing all branches at once Dany
2013-07-03 23:38 ` Jonathan Nieder
2013-07-04  8:06 ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.