git Batch edit last few git commits Git rebase have an `--exec` option to run for every commit. For example, to update commit time for last 2 commits. git rebase HEAD~2 --exec "git commit --amend --no-edit --date 'now'"