Skip to content

Instantly share code, notes, and snippets.

@luiarthur
Last active February 16, 2023 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luiarthur/6b09b0a502f1b4ebc5cd6a24f4473fce to your computer and use it in GitHub Desktop.
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.
#!/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