Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

pro tip: squash (rebase) your commits then force push to remove "fix typo" history


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: