Delete the last commit, if it hasn't been pushed.
git reset --soft HEAD~1
Delete the last commit, if it has been pushed.
git reset --hard HEAD~1
git push origin HEAD --force
Temporarily ignore local changes to a file
| #!/bin/sh | |
| # Credits to: | |
| # - http://vstone.eu/reducing-vagrant-box-size/ | |
| # - https://github.com/mitchellh/vagrant/issues/343 | |
| # - https://gist.github.com/adrienbrault/3775253 | |
| # Unmount project | |
| umount /vagrant |
Delete the last commit, if it hasn't been pushed.
git reset --soft HEAD~1
Delete the last commit, if it has been pushed.
git reset --hard HEAD~1
git push origin HEAD --force
Temporarily ignore local changes to a file