Merge two git commits into one | Drupal 8

Merge two git commits into one

Submitted by editor on Tue, 09/05/2017 - 16:57
Question

How to merge two git commits into one ?

This is an example to merge 2 last commits.

1. git rebase -i HEAD~2

2. Change pick to squash the commit you want to merge

3. Save and Exit

4. git push -f origin master

Tags

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.