What's the difference between a button click and a normal git button click
You only force-push when you need to replace the deleted history with your local history.
This happens when you rewrite local history, usually viagit rebase
.
For example, if you just pushed the wrong commit and changed it locally, using it push --force
might help fix the recent push
If you are the only one in the industry you click on it, it doesn't really matter.
If you are not the only one, then you need to communicate clearly so that other users reset to have their own local branch on the new remote computer. Or, you need to avoid the forced push in the first place.
Is it good practice to force push to the master branch?
This is generally not a good practice (again, unless you are using a remote repo).
And don't forget that after the branch has been pushed ... you may not know who didpush --force
.
source to share
Force-pushing is a very threatening and risky technique if you are working on a shared repository. With this power, you can force your local revision of the remote repository.
But pushing hard on a remote repo is not good practice. You can use normal push and resolve conflicts between commits, if any.
source to share