-
Notifications
You must be signed in to change notification settings - Fork 0
GIT workflow
For early versions, we use regular simplified github-flow, that is each developer has to:
- set up
- make new feature or a fix
- make and merge a PR to the
Multy-io
repo - Once have enough features, release
To start working on a project, fork corresponding Multy-io
project using GitHub UI.
Then, clone forked project into your machine with:
git clone <url>
For example:
git clone [email protected]:Multy-io/Multy-Core.git
Then add a upstream
remote:
git remote add upstream [email protected]:Multy-io/Multy-Core.git
We are using following remotes:
origin # your personal fork of the corresponding Multy-io project
upstream # Multy-io project
<other> # you might add a remote to share your pull work from others.
To list all remotes, do:
git remote -v
You should see something like:
origin [email protected]:Enmk/Multy-Core.git (fetch)
origin [email protected]:Enmk/Multy-Core.git (push)
pasha https://github.com/PashaKlybik/Multy-Core.git (fetch)
pasha https://github.com/PashaKlybik/Multy-Core.git (push)
upstream [email protected]:Multy-io/Multy-Core.git (fetch)
upstream [email protected]:Multy-io/Multy-Core.git (push)
git remote add <name> <URL>
For example, to add upstream:
git remote add upstream [email protected]:Appscrunch/Multy-Core.git
- create a feature-branch from
upstream/master
(or other branch), see more in branches:- branch name should start with Jira issue key and short description:
MUL-643_BTC_explicit_change_address
- branch name should start with Jira issue key and short description:
- implement a feature or fix a bug
- commit, with following message format:
- If commit is a hotfix, please use title:
FIX MUL_XXX: description
- If commit introduces a new feature,
MUL_XXX: description
is enough. - blank line
- List of things implemented or fixed with detailed description of what was done and why.
- Please see https://github.com/Appscrunch/Multy-Core/commit/f6045ce3d83568c2967ede3e83d283f2e440a3f7 for commit message reference.
- If commit is a hotfix, please use title:
-
squash
all commits of feature-branch into one -
push
feature branch to the origin. - Create a pull request to an appropriate branch of the upstream using github UI.
- When a feature or fix is ready to commit (all modifications were reviewed and accepted by reviewers), it should be merged into upstream with big green "Merge pull request" button. Please do not use "Squash merge" as it breaks history on GitHub.
Please note that PR must contain information on what was done and why, basically, if you have solid commit messages, you can use squashed comment description as PR text.
To develop a new feature create a new branch from most recent upstream/master:
git fetch upstream/master
git checkout -b MUL-643_BTC_explicit_change_addres FETCH_HEAD
First, save current progress by committing and pushing into github.
git add files-that-are-not-managed-by-git-yet
git commit -a
git push origin HEAD
Now switch to another task: To start a new task, please follow instructions in 'New feature'. Or switch to existing task:
git checkout branch-name
If there is a new fix\feature in upstream/master you want to use in your branch, rebase it:
# Don't forget to add new files.
git commit -a
git fetch upstream\master
git rebase -i FETCH_HEAD
First, make sure that all the files you want in a review are added and committed. Then, submit your work to a GitHub, with:
git push origin HAED
Go to GitHub UI and create a pull request.
# Edit files according to a review
git commit -a
git push origin HEAD -f # updates a PR automagically.
Once all features are done and merged, it is time to release a new version based on your work.
- create a branch from a
master
, calledrelease_X.Y
git branch -b release_1.5
- push that branch to the upstream
git push upstream release_1.5
- make a tag with the exact version
git fetch upstream
git checkout upstream/release_1.5
git tag release_1.5.0 release_1.5 -m "<Tag message>"
git push upstream release_1.5.0
- Build and ship the release from exactly
release_1.5.0
Once the version is released, only hotfixes can be pushed to the corresponding branch. When you need to release a hotfix:
- create a fix branch from release branch
git branch -b fix_MUL_1337_corrupting_blockchain_state_on_all_nodes_around_globe release_1.5
- Fix an issue in that branch, commit fixes
- make a PR and merge it into
upstream/release_1.5
(with proper review) - tag new release
git fetch upstream
git checkout upstream/release_1.5
git tag release_1.5.1 release_1.5 -m "Fixed corrupting blockchain state on all nodes around the globe"
git push upstream release_1.5.1
- Build and ship the release from exactly
release_1.5.1