Last active
February 16, 2023 02:53
-
-
Save luiarthur/6b09b0a502f1b4ebc5cd6a24f4473fce to your computer and use it in GitHub Desktop.
Undo the last commit and add, keeping the changes so they can be stashed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# Undo the last commit by: | |
# > git uncommit | |
# Installation: | |
# 1. Put this file in `~/bin/git-uncommit` | |
# 2. `chmod +x ~/bin/git-uncommit` | |
git reset HEAD^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment