For further actions, you may consider blocking this person and/or reporting abuse
Read next
Hacktoberfest: How You Can Contribute to Open Source and Make a Difference in 2024
Avinash Singh -
Deploying a Web App with CI/CD Pipeline on Azure App Service Using GitHub and Visual Studio Code
Florence Enenmo -
Git Branching
Farhat Sharif -
How to push large files to git repository using Git LFS
Unegbu Clinton -
Top comments (2)
In short, yes, it is a bad practice. Force modifying the git history can get your collaborators out of sync. Instead of modifying existing commits, prefer to make a new commit and do a non-force push. Force push is unnecessary most of the times.
There is one exception to this rule. If you are working alone on a feature branch, force pushing does not affect anyone on the main branch. So when you would like to rebase your feature branch or edit some commit messages, you can force push those modifications on your feature branch. No one gets out of sync, even after your feature branch is merged into the main branch.
Thanks for clarifying