4 ms·
... due to force pushing multiple branches?
by penguindev 13y ago
... due to force pushing multiple branches?
- glasser 13y agoExactly. Doing that by mistake (and then being taught to set `push.default` to upstream or simple) has been a rite of passage for engineers at my company.
- markmark 13y agoI never quite understood why the default was what it was. I can count the times I've wanted to push all branches at once on no hands. But maybe that's just my work flow.
- stefan_kendall3 13y agoI've seen someone do it. If your workflow is 'git push -f feature' after rebasing, instead of 'git push feature -f', you can tap enter and break the world.
- penguindev 13y agoIt really blows my mind that you say those two aren't equivalent. I now must read the man pages... Edit did you mean to say (plus)feature or is something ruining the formatting? That seems to be how to specify only one branch. Yuck. I'm lucky I haven't run into this, I guess, because I set my push default to simple a long time ago, so long ago I can't even remember why.
- stefan_kendall3 13y agoThe two are equivalent if you type them in full, but if you stop one before typing the feature branch name, you've broken everything. git push -f (enter) => Death to all branches. git push feature -f => Can only ever force push the feature branch No matter when you press enter in the second line, intentionally or accidentally, you can't break all branches.
- penguindev 13y agoAh, I see. Thanks for clarifying.
- mikeklaas 13y ago`push -f` and `workflow` should never be in the same sentence.