Skip to content

Add missing answer for 'How to squash last two commits' in Git README#10627

Open
WhoisMonesh wants to merge 1 commit into
bregman-arie:masterfrom
WhoisMonesh:fix-git-squash-missing-answer
Open

Add missing answer for 'How to squash last two commits' in Git README#10627
WhoisMonesh wants to merge 1 commit into
bregman-arie:masterfrom
WhoisMonesh:fix-git-squash-missing-answer

Conversation

@WhoisMonesh
Copy link
Copy Markdown

Changes Made

Added a missing answer to the question "How to squash last two commits?" in topics/git/README.md.

The question previously had an empty answer section (<b></b>). Added the correct answer:

  • Use git rebase -i HEAD~2
  • In the interactive editor, change the second pick to squash (or s)
  • Save and provide a commit message for the squashed commit

Why

This question had no answer despite being a common Git task. Related to the squashing commits exercises and the discussion in issue #10557.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant