Repository navigation
Contribution Process for Ubuntu
Arushi Singhal edited this page Apr 12, 2020
·
4 revisions
On Linux, you can use
sudo apt-get update
sudo apt-get install git -y
# Configure the username, replace First Last:
git config --global user.name "First Last"
#Configure the email, replace example@example.com:
git config --global user.email "example@example.com"On Linux, you can use
sudo snap install hub --classic$ hub clone https://github.com/hyperledger/cello.git
$ cd cello
$ hub fork --remote-name=origin
$ git branch master --set-upstream-to origin/masterIf 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 themasterbranch will track it; -
upstream: The officialhyperledger/cellorepo.
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-xxxCommit message policy
[#issue-no] Short Title
Detailed Commit Message
Close #issue-no
And if you want to auto close related issue, can see the closing-issues-using-keywords.
$ 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