DEV Community

Discussion on: Git commands I find very useful and why

Collapse
 
jdeepd profile image
JDeep

For the last point,

if already pushed then you'll need to --force it, since you're effectively rewriting history

It is not recommended because if someone else had pulled the changes after you pushed to remote, then they will have a hard time pushing their changes once you ammend a commit and force push to remote.

Collapse
 
siddiqus profile image
Sabbir Siddiqui

Definitely true. More so applicable for your own branches. Terrible if branches are either shared or common branches are needed.