Skip to content

Git merge

fernandog edited this page Oct 10, 2016 · 12 revisions

Requirement


Index


Merge develop into master

Increment the tag number each time.

$ git checkout master
$ git merge --no-ff develop
$ git tag -a v0.0.0
$ git push origin master
$ git push --tags origin master

Merge a PR via command line

  • The PR must be based on Medusa:develop
  • The branch we want to commit is {YOUR_GITHUB_USER}:branchABC
$ git checkout -b branchABC develop
$ git pull https://github.com/{YOUR_GITHUB_USER}/Medusa.git branchABC
$ git checkout develop
$ git merge --no-ff branchABC
$ git push origin develop
$ git branch -d branchABC

Merge a hotfix(master and develop)

  • The PR must be based on Medusa:master
  • The branch we want to commit is {YOUR_GITHUB_USER}:branchABC
$ git checkout -b branchABC master
$ git pull https://github.com/{YOUR_GITHUB_USER}/Medusa.git branchABC
$ git checkout master
$ git merge --no-ff branchABC
$ git push origin master
$ git checkout develop
$ git merge --no-ff branchABC
$ git push origin develop
$ git branch -d branchABC