[push]
config = default
default = tracking
I once made a virtual machine and didn't pull in my usual .gitconfig. It ruined my day.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.
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.
on long running features, you 1. want to save your state off of your laptop and 2. keep it clean for your own review and for others' review. thus, force push is required, otherwise you'd have to keep making new revs of your branch (branch named joeblow/my_feature_rev_4).
The fact that git lets you shoot yourself in the foot doesn't mean you should, definitely not incorporate this into working procedures.
If it's a private feature branch, don't make it public (pushing would still back it up on the server, though you'd have to know the sha1 to fixed it). If it's public, don't rebase it.
And yet you don't know the reason. It's because others may have merged your work or be dependent on it. In my case, that doesn't happen, because it's a private branch. I'm the only developer, but other people can look at it for review.