#!/bin/sh # Remove the given files from the last commit # https://stackoverflow.com/a/70197343 git reset HEAD~ "$@" git commit -v --amend