Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

How to make multiple commits squashed in one commit from feature branch

Run to see commit history

    git log

Let's make the latest 2 commits in one commit

    # I used 2 to capture 2 latest commit
    git rebase -i HEAD~2

It will open a tab with a list of commits

Change the word pick to squash on commits you want to omit or remove

to save and exit the changes hit ESC :wq

Another tab will pop up with messages of commits

Comment the commit messages you want to remove

to save and exit the changes hit ESC :wq

Check the commit log again by running

    git log

you see that there is no duplicate commit message

then push our update

    git push origin develop -f

About

Make multiple commits into one commit

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors