Live data from Hacker News

Git rebase in depth

git-rebase.io

1–10 of 248 posts

Re: Git rebase in depth

#4

I fear that any process that allows for a git push -f at any time is eventually going to result in someone hammering a shared/public repo when they meant to hammer their personal repo.

Just block force pushes to shared branches.

Re: Git rebase in depth

#7
post #4

I fear that any process that allows for a git push -f at any time is eventually going to result in someone hammering a shared/public repo when they meant to hammer their personal repo.

Just block force pushes to shared branches.

one of us owes the other a coke :-)

Re: Git rebase in depth

#8

I fear that any process that allows for a git push -f at any time is eventually going to result in someone hammering a shared/public repo when they meant to hammer their personal repo.

On sourcehut in particular, you actually hardly use `git push` in the first place, opting instead to use git send-email[0] from your local copy. The GitHub concept of "forks" is not used on sourcehut.

[0] https://git-send-email.io

Still, rebasing is an important workflow to master even if you work on GitHub or on shared branches with others. If you mess up and force push to the wrong branch, you can always go back to the reflog[1] and check out the old version, then force push it.

[1] https://git-rebase.io/#reflog

And in the immortal words of Doug Gwyn(?): "UNIX was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things."

Re: Git rebase in depth

#9
When you have a command so confusing that you need an entire website dedicated to a single command, and still need to warn against using it, then perhaps you've got the UX wrong.
Post reply on HN