Skip to content

Instantly share code, notes, and snippets.

@songritk
Created November 24, 2016 10:42
Show Gist options
  • Save songritk/a323288432456f7e608d8b3c466c0289 to your computer and use it in GitHub Desktop.
Save songritk/a323288432456f7e608d8b3c466c0289 to your computer and use it in GitHub Desktop.
#!/bin/bash
sha1=$1
if ! [ $# -eq 1 ]
then
echo "./revert-git.sh <commit HASH number>"
exit
fi
git reset --hard $sha1
git push -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment