#!/bin/sh -e
#
# git-unamend - remove given files from last commit
#
# immediately revert all changes to file "$@"
# in the last commit without changing its (working tree) contents:
#
# ---
# see: https://overflow.adminforge.de/questions/70197343/#10127051
# https://overflow.adminforge.de/questions/70197343/#70197343

git reset HEAD~ "$@"
git commit --verbose --amend
# git commit --verbose --amend --no-edit
