Skip to content

How_to_contribute

pingkai edited this page Mar 24, 2020 · 4 revisions

How to Write a Git Commit Message

We use angular standard.

You can use the commitizen tool

npm install -g commitizen
npm install -g cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc

use "git cz" instead of "git commit"

Code style

We use clang format tool to format code use the .clang-format file in the root directory of the repository and is discovered by the tool automatically.

If you didn't have the clang-format tool, install it:

sudo apt install clang-format

or

brew install clang-format

In general, after you make your changes you can do the following

git add <list of files>
git clang-format
git add <list of files that got formatting changes>
git cz -s

How to make a pull request

  • fork the alibaba/CicadaPlayer git

  • clone the CicadaPlayer git into your develop pc

git clone git@github.com:yourname/CicadaPlayer.git
  • add the alibaba remote and fetch
cd CicadaPlayer
git remote add alibaba git://github.com/alibaba/CicadaPlayer.git
git fetch alibaba
  • checkout a new branch form alibaba develop
git checkout alibaba develop -b develop
git checkout -b topic alibaba/develop
  • rebase your change
git checkout develop
git pull alibaba develop

git checkout topic
git rebase develop
  • after resolve conflict , push to origin
git push origin topic:topic
  • make a pull request to alibaba/CicadaPlayer, this will trigger a travis build, unit test and coverage test, your pull request will not be merged if build err, coverage descend or the cla is not be agreed.

Clone this wiki locally