Skip to content

Instantly share code, notes, and snippets.

@gayanvirajith
Last active May 18, 2017 06:10
Show Gist options
  • Save gayanvirajith/b02faca1a78fd52e0fc275f060d1b81f to your computer and use it in GitHub Desktop.
Save gayanvirajith/b02faca1a78fd52e0fc275f060d1b81f to your computer and use it in GitHub Desktop.
How to merge branch into master with mustiple branch tree

Fetch remote branches to your local repository.

git fetch origin QA

git fetch origin master

Fetch the branch that you need to merge

git fetch origin branch_that_you_want_to_merge

git checkout dev_combine

Merge branch_that_you_want_to_merge to dev_combine. Assumes that you are on dev_combine branch.

git merge origin/branch_that_you_want_to_merge

Push merge changes to remote repository

git push origin dev_combine

Switch branch to QA

git checkout QA

git pull origin QA

Merge dev_combine to QA branch. Assumes that you are on QA branch.

git merge origin/dev_combine

Push merge changes to remote repository

git push origin QA

Switch to master branch

git checkout master

git pull origin master

Merge QA to master. Assumes that you are on master branch.

git merge origin/QA

Make version tag

git tag 1.6.4

Push merge changes to remote repository

git push origin master --tags

@nirmalrepo
Copy link

nirmalrepo commented May 18, 2017

Should take a back up of existing set

On the server should use sudo -u www-data git pull origin master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment