$ git add .
$ git commit -m "abc xyz"
# dafug... wrong file... useless commit ... need to revert/remove this commit
Solution:
First, remove the commit on your local repository. You can do this using git rebase -i.
For example, if it's your last commit, you can do git rebase -i HEAD~2 and delete the second line within the editor window that pops up --> save this file
Then, force push to GitHub by using git push origin +branchName
Problem:
Solution:
First, remove the commit on your local repository. You can do this using
git rebase -i
.For example, if it's your last commit, you can do
git rebase -i HEAD~2
and delete the second line within the editor window that pops up --> save this fileThen, force push to GitHub by using
git push origin +branchName
Reference:
https://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-github/448929#448929