Sometimes you commit to a Git branch and you realize you did not want to commit the published JS and CSS files as well, but you did. Well there is a solution for that.
git reset --soft HEAD~1
git reset HEAD public/*
git commit -c ORIG_HEAD
git push --force
It will reset to 1 commit back in this case so you may need to change to more than that like my if you made more erroneous commits. Once that is done you can remove the static compiled assets from the commit using a
git reset HEAD public .
Then you dod a new commit but using `ORIG_HEAD`. Once that is done you push with force so warnings that you are behind committed files on remote and update your branch.
NB I would not recommend this in master branch, but in a feature branch this works miracles!