This is the git policy used for all Liqwid Labs projects. This is loosely based on the MLabs git policy, but a couple changes in wording and strictness have been applied.
<aside> ❓ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
</aside>
All projects outside of Liqwid Libs have the following primary branches:
staging |
An unstable branch used to collect works-in-progress. May not have passing CI at all times. |
---|---|
main |
A stable branch ready for downstream integration. Must have passing CI at all times. |
testnet |
A stable branch known to work on the current testnet all the way downstream. Must have passing CI at all times. |
mainnet |
A stable branch known to work on the current mainnet all the way down stream. Must have passing CI at all times. |
The goal is to always have known-working commits in the testnet
and mainnet
branches.
The PR workflow is as follows
staging
is used in the repository:
staging
.
<username>/<feature>
staging
gets merged into main
weekly or biweekly. staging → main
hotfix → main → staging
testnet
or mainnet
must first happen downstream before the same changes can be merged upstream.
liqwid-onchain
, it begins in staging
and moves to main
once it is ready to be integrated into liqwid-offchain
in staging
. When the feature reaches main
in liqwid-offchain
, it starts in staging
on lq-app
. Once it reaches testnet
in lq-app
, the upstream commits in liqwid-offchain
and liqwid-onchain
should also be moved to testnet
.When merging PRs maintainers MUST use git merge
, and not git rebase
git rebase
within a PR in order to clean up the commit log.GitHub settings page where disabling squash and rebase can be disabled or PRs.
squash/--amend
or force pushes on main
or staging
, even for fixing commit history. “Pretty” commit history does not take precedence over preserving a consistent append-only history.
Contributors MUST use concise but descriptive commit messages.
The first line of a commit MUST NOT be longer than 72 characters.
<aside> 💡 This is the line limit for GitHub’s log view.
</aside>
Multi-line commits