Hacker News new | ask | show | jobs
by isacikgoz 2704 days ago
pro tip: squash (rebase) your commits then force push to remove "fix typo" history
2 comments

An even "proer" tip: rebase your commits into something coherent BEFORE pushing, and you can drop the "force".
pro tip: be careful in using force push. In the past there's a version of git where it defaults to force all your local branches into the remote copy. When I did use force push, it pushed everything including my outdated local copy of PROD. Fortunately we were able to fix this before somebody else ran a git pull.

the new versions I believe are configured safer now afaik.