...
NOTE: Due to recently found synchronization issue between GitBox and Github repositories, committers should only use Github repositories for pushing commits.
Using Github
Make sure you following the setup to link your Github account with your ASF account.
using GitHub command line
Use the following remote as your push/fetch:
Code Block | ||||
---|---|---|---|---|
| ||||
> git remote add <remote_name> git@github.com:apache/flink |
For example, if you are setting up a remote "github", your setup should look like this:
Code Block | ||||
---|---|---|---|---|
| ||||
> git remote -v
github git@github.com:apache/flink (fetch)
github git@github.com:apache/flink (push) |
using GitHub web UI
In addition to the command line, you can also use web UI to merge pull requests, either using the "Squash and merge" button or "Rebase and merge" button.
For the "Squash and merge" option, the pull request's commits are squashed into a single commit and merged into the master branch using the fast-forward option. This is often used to squash fixup commits thus can retain the original changes with a clear Git history.
For the "Rebase and merge", all commits from the PR are rebased and added onto the master branch. This is often used when we want to preserve all the commits, i.e., preserve "refactor" and "feature" differentiation in history rather than squash everything.
Using GitBox
Using GitBox, you are not required to link your Github account using the utility. Your remote setup should look like the following:
Code Block | ||||
---|---|---|---|---|
| ||||
> git remote -v gitbox https://gitbox.apache.org/repos/asf/flink.git (fetch) gitbox https://gitbox.apache.org/repos/asf/flink.git (push) |
Notices for merging a pull request
- Always merge the code on condition that tests are passed.
- Squash fixup commits thus we can retain the original changes with a clear Git history. However, it's important to notice that some pull requests often consist of multiple commits where we want to preserve "refactor" and "feature" differentiation in history rather than squash everything.
- Check the commit message. Ensure that the Jira id and components are right, e.g., `[FLINK-XXX][docs] XXX`. Ensure the title is clear and meaningful.
- It's a good manner to add "This closes #<pr_id>" line in the commit message. It not only helps you to close the corresponding pr but also helps others to trackback commits to PRs/reviews. If you use GitHub web UI, it will append the pr_id automatically after the title. Add one if you find it is missing.
- Once the code has been merged, you should pay attention to the Flink build and check if everything is right. You can subscribe to the build mailing list to get notifications. Create a Jira if something is broken on the master branch.