Skip to main content
Command update
Source Link
Nivir
  • 30.9k
  • 8
  • 43
  • 55

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> 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~5git rebase -i HEAD~5.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> 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.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> 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.

A better explanation of <after-this-commit>
Source Link

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> is commit X+1 i.e. parenteither the SHA1 hash or the relative location from the HEAD of the oldest commit you wantcurrent branch from which commits are analyzed for the rebase command. For example, if the user wishes to squashview 5 commits from the current HEAD in the past the command is git rebase -i HEAD~5.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> is commit X+1 i.e. parent of the oldest commit you want to squash.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> 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.

added 109 characters in body
Source Link
iwasrobbed
  • 46.6k
  • 21
  • 151
  • 195

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> is commit X+1 i.e. parent of the oldest commit you want to squash.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

Use git rebase -i <after-this-commit> and replace "pick" on the second and subsequent commits with "squash" or "fixup", as described in the manual.

In this example, <after-this-commit> is commit X+1 i.e. parent of the oldest commit you want to squash.

http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html was remapped to http://git-scm.com/docs/git-rebase by Sam Saffron (17174)
Source Link
Loading
Source Link
Anomie
  • 93.9k
  • 13
  • 128
  • 145
Loading