Git force push

Edward Ziadeh • 14 March 2019
Blog in group Git

Some time we need to force push a local copy to the git and it can be done by 

git push -u origin master --force

But make sure that it's ok to override the existing commit or you can use another way

git push --force-with-lease

This command will let you override the old commit and it will keep the old commits so you can use it again.