0onuma
Last Updated: February 25, 2016
·
461
· leemachin

Quickly merge feature branches in git

Sometimes the process of working in a branch and then merging it can be quite tiresome:

git checkout -b feature/liberally-apply-awesome-sauce
# ... make the changes
git add .
git commit -am "Adds healthy dose of awesome sauce to views"
git checkout master
git merge --no-ff feature/liberally-apply-awesome-sauce

Turns out you can spare your fingers some effort when merging:

git checkout -b feature/liberally-apply-awesome-sauce
# make changes and commit
git checkout master
git merge --no-ff -

Git sometimes-but-not-always interprets the hyphen as 'the last branch you were in'.

😄

Say Thanks
Respond
Filed Under