|
| 1 | +# Contributing |
| 2 | + |
| 3 | +This agreement is for collaboration, it may not be detailed enough, if it is not clear how to do what you want, this is a normal situation, just ask your colleagues |
| 4 | + |
| 5 | +## Main flow |
| 6 | + |
| 7 | +### Step 1 — get code |
| 8 | + |
| 9 | +```shell |
| 10 | +git clone [email protected]:ton-connect/ton-connect-qa.git |
| 11 | +cd ton-connect-qa |
| 12 | +git checkout -b name-of-feature origin/main |
| 13 | +``` |
| 14 | + |
| 15 | +### Step 2 — write code |
| 16 | + |
| 17 | +Coding and testing local see [README.md Development](https://github.com/elemgame/elemgame.app#development) |
| 18 | + |
| 19 | +> Git history: work log vs recipe https://www.bitsnbites.eu/git-history-work-log-vs-recipe/ |
| 20 | +
|
| 21 | +Use [Conventional Commits](https://www.conventionalcommits.org/) |
| 22 | + |
| 23 | +```shell |
| 24 | +git commit --message "feat: paypal payment for different users" |
| 25 | +``` |
| 26 | + |
| 27 | +or |
| 28 | + |
| 29 | +```shell |
| 30 | +git commit --message "fix: hide password display when searching for a user" |
| 31 | +``` |
| 32 | + |
| 33 | +### Step 3 — make fork |
| 34 | + |
| 35 | +Follow by link for make fork: |
| 36 | +https://github.com/ton-connect/ton-connect-qa/fork |
| 37 | + |
| 38 | +Setup your remote |
| 39 | + |
| 40 | +```bash |
| 41 | +git remote add self url_your_fork |
| 42 | +``` |
| 43 | + |
| 44 | +### Step 4 — make pull requests |
| 45 | + |
| 46 | +Push and create pull requests |
| 47 | + |
| 48 | +```shell |
| 49 | +git push --set-upstream self name-of-feature |
| 50 | +``` |
| 51 | + |
| 52 | +Follow by link: |
| 53 | + |
| 54 | +```shell |
| 55 | +https://github.com/ton-connect/ton-connect-qa/pull/new/name-of-feature |
| 56 | +``` |
| 57 | + |
| 58 | +### Step 5 — update branch from main |
| 59 | + |
| 60 | +This step may be necessary in case your colleagues suggest additional changes after reviewing the code. |
| 61 | + |
| 62 | +> [!NOTE] |
| 63 | +> A tidy, linear Git history https://www.bitsnbites.eu/a-tidy-linear-git-history/ |
| 64 | +
|
| 65 | +Get the latest upstream changes and update the working branch: |
| 66 | + |
| 67 | +```shell |
| 68 | +git fetch --prune origin |
| 69 | +git rebase --autostash --ignore-date origin/main |
| 70 | +``` |
| 71 | +> [!WARNING] |
| 72 | +> Please note that you get the current state of the main branch from the **origin** remote for doing push to **self** |
| 73 | +
|
| 74 | +During the rebase, there may be conflicts, they need to be resolved and after the decision to continue the rebase: |
| 75 | + |
| 76 | +```shell |
| 77 | +git rebase --continue |
| 78 | +``` |
| 79 | + |
| 80 | +Upload the updated working branch to the repository, given that we changed the history, this should be done with the force option: |
| 81 | + |
| 82 | +```shell |
| 83 | +git push --force --set-upstream self name-of-feature |
| 84 | +``` |
| 85 | + |
| 86 | +More details can be found in the tutorial: [git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) |
0 commit comments