-
Notifications
You must be signed in to change notification settings - Fork 444
Contribution Process
Haitao Yue edited this page Nov 4, 2019
·
20 revisions
On macOS, you can use
$ brew install hub
hub
requires git
, and can replace its commands for most cases.
$ hub clone https://github.com/hyperledger/cello.git
$ cd cello
$ hub fork --remote-name=origin
$ git branch master --set-upstream-to origin/master
If ask for the github password, provide the access token as password. Now there will be a cello
repo under your own github account.
Check the .git/config file, there will be two remotes:
-
origin
: Your own repo, and themaster
branch will track it; -
upstream
: The officialhyperledger/cello
repo.
You only need to do this forking once.
Sync your repo with the official one.
Checkout a new feature branch, commit the code change and push to your repo. Suppose your issue number is xxx
.
$ git fetch upstream master && git rebase FETCH_HEAD && git push -f origin
$ hub checkout -b issue-xxx
$ # do the code change at fix_bug branch
$ hub commit -a -s
$ hub push --set-upstream origin issue-xxx
Commit message policy
[#issue-no] Commit Title
Commit Message
And if you want to auto close related issue, can see the doc.
$ hub pull-request [-b upstream:master] [-r <REVIEWERS> ]
After review an approved, you can delete the issue branch.
$ git fetch upstream master && git rebase FETCH_HEAD && git push -f origin
$ git push -d origin issue-xxx
$ git branch -d issue-xxx