GitHub

Git / GitHub Commands

If you already pushed a commit to github and want to roll it back:

For the last commit:
git rebase -i HEAD~2

Delete the line of the commit you want to remove (If you are in VIM, 'dd' then ':wq')

git push origin +master

This should also do it in 1 command (have not tried it):
git push -f origin HEAD^:master

http://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-g...

If you want to delete a tag on github:

git push origin :TAGNAME

e.g.
git push origin :1.0M1
To git@github.com:mystuff/myproject.git
- [deleted] 1.0M1

Syndicate content