Git: Replace the master branch with a feature branch

Step by step guide:

Checkout to the feature branch

git checkout feature_branch
git merge -s ours --no-commit master
git commit # add information to the template merge message
git checkout master
git merge feature_branch #fast-for­ward merge
git push

--

--

BITS-Pilani Technocrat, Learner, Thinker, Dreamer, Traveler, Programmer. Other blog: http://viparitadisha.blogspot.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amit Mutreja

Amit Mutreja

BITS-Pilani Technocrat, Learner, Thinker, Dreamer, Traveler, Programmer. Other blog: http://viparitadisha.blogspot.com