Contributing to Beego
Beego is free and open source software, which means that anyone can contribute
to its development and progress under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0.html). Beego’s source code is hosted on github
How can I become a contributor of Beego?
You can fork, modify and then send a Pull Request to us.
We will review your code and give you feedback on your changes as soon as possible.
The process for pull requests for new features and bug fixes are not the same.
Pull requests for bug fixes do not need to create an issue first. If you have a
solution to a bug, please describe your solution in detail in your pull request.
You can help improve the documentation by submitting a pull request to the
New features proposals
Before you submit a pull request for a new feature, you should first create an
[Proposal] in the title, describing the new feature, as well as the
Proposals will be reviewed and discussed by the core contributors, and can be
adopted or potentially rejected.
Once a proposal is accepted, create an implementation of the new features and
submit it as a pull request. If the guidelines are not followed the pull
request will be rejected immediately.
Since Beego follows the Git Flow
branching model, ongoing development happens in the
develop branch. Therefore,
please base your pull requests on the HEAD of the
The git branches of Beego
The master branch is relatively stable and the dev branch is for developers. Here is a
sample figure to show you how our branches work:
For more information about the branching model: http://nvie.com/posts/a-successful-git-branching-model/
A simple guideline for Git command
You must have a github account, if not, please register one.
- Click https://github.com/beego/beego/v2
- Click “Fork” button which is on top right corner
We recommend using official repo as
origin repo, and then add a remote upstream to your repo.
If you already set SSH key, we recommend use SSH. The difference is that, we don’t need to input the username and password to push changes.
git clone email@example.com:astaxie/beego.git cd beego git remote add upstream 'firstname.lastname@example.org:<your github username>/beego.git'
git clone https://github.com/beego/beego/v2.git cd beego git remote add 'https://github.com/<you github username>/beego.git'
upstream in command could be replaced with any word you like.
Every time you want to something, you’d better fetch remote changes:
In this command, git only fetch
If we want to fetch our remote repo changes:
git fetch upstream
You can replace
upstream with your repo name
create feature branch
我们在创建新的 feature 分支的时候，要先考虑清楚，从哪个分支切出来。
Before creating feature branch, we should think about choosing a branch as base branch.
Assume that we want to merge the new feature to develop branch. In such case:
git checkout -b feature/my-feature origin/develop
Don’t forget to run
git fetch before you create feature branch.
git add . git commit git push upstream my-feature
Go to https://github.com/beego/beego, and make a Pull request