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'.
😄
Written by Lee Machin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Merge
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#