GIT-HISTORY(1) (NAME) git-history - : (SYNOPSIS) git history fixup [--dry-run] [--update-refs=(branches|head)] [--reedit-message] [--empty=(drop|keep|abort)] git history reword [--dry-run] [--update-refs=(branches|head)] git history split [--dry-run] [--update-refs=(branches|head)] [--] [...] (DESCRIPTION) . . . git-rebase(1) : o git-history(1) (bare repository) (index) (worktree) . fixup (staged) . o git-history(1) githooks(5) . . o git-history(1) . git-history(1) git-rebase(1) . git-rebase(1) rebase . (LIMITATIONS) () . git-rebase(1) --rebase-merges . (merge conflict) . . (first-class conflicts) ( ). fixup --empty=drop . (COMMANDS) : fixup . git commit --fixup= git rebase --autosquash ~ . HEAD . --reedit-message . . . reword . . . split [--] [...] (hunks) . . . . . . pathspec . pathspec gitglossary(7) . . (OPTIONS) --dry-run git-update-ref(1) . . --reedit-message . --empty=(drop|keep|abort) fixup . : o fixup . o . drop () . . (LIMITATIONS) . keep . abort . --update-refs=(branches|head) . branches . head HEAD . branches . (EXAMPLES) (Fixup a commit) $ git log --oneline --stat abc1234 (HEAD -> main) third third.txt | 1 + def5678 second second.txt | 1 + ghi9012 first first.txt | 1 + $ echo "change" >>unrelated.txt $ git add unrelated.txt $ git history fixup ghi9012 $ git log --oneline --stat jkl3456 (HEAD -> main) third third.txt | 1 + mno7890 second second.txt | 1 + pqr1234 first first.txt | 1 + unrelated.txt | 1 + unrelated.txt first . . (Split a commit) $ git log --stat --oneline 3f81232 (HEAD -> main) original bar | 1 + foo | 1 + 2 files changed, 2 insertions(+) $ git history split HEAD diff --git a/bar b/bar new file mode 100644 index 0000000..5716ca5 --- /dev/null +++ b/bar @@ -0,0 +1 @@ +bar (1/1) Stage addition [y,n,q,a,d,p,?]? y diff --git a/foo b/foo new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/foo @@ -0,0 +1 @@ +foo (1/1) Stage addition [y,n,q,a,d,p,?]? n $ git log --stat --oneline 7cebe64 (HEAD -> main) original foo | 1 + 1 file changed, 1 insertion(+) d1582f3 split-out commit bar | 1 + 1 file changed, 1 insertion(+) (SEE ALSO) git(1), git-rebase(1), git-update-ref(1), githooks(5), gitglossary(7) (GIT) git(1) Git 2.55.0 2026-06-29 GIT-HISTORY(1)