How you can go wrong with Git
adityasridhar.com
adityasridhar.com
This pushes your commits if you already know all commits that are in the branch in the remote. Of course this still leaves the problem that others will have merge conflicts when they pull from the remote.
Rebasing is powerful tool and it really provides great benefits.
Especially before your merge your branch to master. It is lot cleaner if someone cleans the branch history so that commits are combined to clean nice commits, before it is merged to master.
Personally I am annoyed about `fix typo in last commit` commits merged to master.
Unless you decide that your git history is not worth maintaining. In that case only merge and commit and never force push. But git history is worth the extra effort to learn to rebase properly imo.
You can disable force push on branches. It's probably a good idea for any branch that is shared. People sharing a branch need to coordinate and rebase their own branches locally. You can merge without any coordination, but it creates a messy history.
I have a rule where you never rebase during a code review, but you do rebase at the end. It's a pet peeve of mine when someone addresses my concerns by amending a commit. Please don't. Use a fixup commit so I can follow what you've done. Then at the end the maintainer should ask you to rebase before he merges it (do autosquash, then manual squashes etc, then base on master).