Contributing git guide · axmolengine/axmol · Discussion #411 (original) (raw)

All pull requests should want merge to branch dev

Fork and clone

  1. Fork on github page to your own github account
  2. Clone your own fork: git clone https://github.com/<your git accout>/axmol.git
  3. Add remote official from axmolengine/axmol

cd axmol git remote add official https://github.com/axmolengine/axmol.git

Create pull-request for bugfix or feature

There are two methods to create a pull-request

  1. For little or 1 file changes,just edit on official repo and press button Propose file change(please ensure create branch on your own fork), then continue to create pr on github page.
  2. Create a pull-request with multiple files changes:

we assume you already add remote official

Sync official remote

git fetch official

create a branch from official latest for PR source branch

git checkout -b feature1 official/dev

After finish changes on branch feature1, push it to your fork repo

git push origin feature1

Then, please goto github page to create pull-request step by step.

Note: Before a pr mreged, any changes from pr source branch will be applied on pr and trigger ci build

Review pull-request

Usually, you can review PR changes on github web page, but when you want verify the PR changes on your local machine, you can merge PR to your local branch and test:

git fetch origin pull/219/head:pr219 git checkout pr219

The 219 is the PR id, the pr219 is local branch name

Some other commands