{{tag>git}} ====== Merge multiple commits into one commit ====== git rebase -i In this example, //// is either the SHA1 hash or the relative location from the HEAD of the current branch from which commits are analyzed for the rebase command. For example, if the user wishes to view 5 commits from the current HEAD in the past the command is git rebase -i HEAD~5 ====== Tested on ====== * ====== See also ====== ====== References ====== * https://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git