Often times when I am working on a feature branch, I want one commit to go into develop or master. For this example, we will demonstrate how to merge a feature branch into master with a single squashed commit.
First, pull the branch you want to merge into. In this case, it is master. I then squash merge the feature branch that I want into master.
- git checkout master
- git pull
- git merge --squash feature/branch
- git status
- git commit -m "describe your commit"
- git push origin master
That's all there is to it. Good luck!
How to merge and squash a feature branch into master
Reviewed by JJ The Engineer
on
8:13 AM
Rating:
No comments: