Skip to content

Instantly share code, notes, and snippets.

@thiagosanches
Last active July 30, 2019 18:55
Show Gist options
  • Save thiagosanches/092dec081f7b58c498bd7ff38d47561b to your computer and use it in GitHub Desktop.
Save thiagosanches/092dec081f7b58c498bd7ff38d47561b to your computer and use it in GitHub Desktop.
It's useful when you have to do some commits just to test, but it will not generate a lot of commit messages, since it's going "back" and generating a new commit
#!/bin/bash
# Important: Only use if you are working on a branch by yourself otherwise it will overwrite someone updates
git reset --soft HEAD~1 \
&& git add . && git commit -m "$1" \
&& git push --force origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment