|
| 1 | +<!-- TODO: Create new screen shots for this project --> |
| 2 | +# Branching |
| 3 | + |
| 4 | +## The branching strategy |
| 5 | + |
| 6 | +The branching strategy looks like this: |
| 7 | + |
| 8 | +The short description of the branching strategy is as follows. |
| 9 | +The feature branches are a category of branches that branch out |
| 10 | +of the `develop` branch. A person branches out from develop, |
| 11 | +works on a given feature on their branch and when the feature |
| 12 | +is ready they submit a Pull Request to merge again into the |
| 13 | +develop branch. After the review process is finished the commits |
| 14 | +from the branch should be squashed and then merged into `develop` |
| 15 | +(GitHubs WebUI provides that). Therefore each commit that lands |
| 16 | +on the `develop` branch is an addition of a feature, documentation |
| 17 | +etc.. When an arbitrary set of new features is completed and could |
| 18 | +be deemed as a new release (release cycle should follow the |
| 19 | +[semver](https://semver.org/) convention) it should be merged |
| 20 | +into `main` (of course it should also follow the process of a |
| 21 | +Pull Request and reviews) when it is merged into `main` |
| 22 | +additional testing, validation etc. should be done as this is |
| 23 | +now a release candidate. If the state of the code is deemed safe |
| 24 | +and proper it should be released as a new version of the software. |
| 25 | +This should be done by tagging which marks a given commit a |
| 26 | +release candidate which should automatically trigger a series of |
| 27 | +CI/CD checks and if they succeed the software package will |
| 28 | +be finally released. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## Creating a task |
| 33 | + |
| 34 | +TL;DR |
| 35 | + |
| 36 | +If you want to work on something create an issue for that. |
| 37 | + |
| 38 | +1. Fill out the name for the issue |
| 39 | +2. Provide a description for the task and what are your plans etc. |
| 40 | +3. If you know you will be working on that task assign yourself |
| 41 | +4. Add applicable labels to the task, e.g. if you are solving a bug |
| 42 | +then add `Bug`, if adding a new functionality add `Enhancement` etc. |
| 43 | +5. Assign the task to the `rust-pip` project |
| 44 | +6. If applicable assign the task to a given milestone |
| 45 | +7. Submit the issue/task |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +## Creating a branch and using it |
| 50 | + |
| 51 | +Then when you have created an issue for you task click the `Create new branch` |
| 52 | +in the lower right corner: |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +Click on the `Change branch source`, then: |
| 57 | + |
| 58 | +1. Make sure that the actual branch name is concise and fairly short |
| 59 | +2. *Make sure that you branch out from the `develop` branch!* |
| 60 | +3. Make sure `Checkout locally` is selected |
| 61 | +4. Click the create branch button |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +Now a branch has been created for you, copy the commands needed for you to use it: |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +In you cloned repository open a terminal and paste the copied commands. |
| 70 | +Now you should be on your newly created branch and you can start working. |
| 71 | +To make sure you are on that branch run: |
| 72 | + |
| 73 | +```bash |
| 74 | +$ git branch |
| 75 | +* 16-task-number-do-something-with-something |
| 76 | +... |
| 77 | +``` |
| 78 | + |
| 79 | +The branch on which you currently reside will be marked with a `*`. |
| 80 | +Next simply keep working on your branch, push commits, and when you think |
| 81 | +you are ready create a Pull Request, make sure that you mark your PR as a |
| 82 | +draft if its not ready for review otherwise it looks like noise. |
| 83 | + |
| 84 | +## Creating a Pull Request (PR) |
| 85 | + |
| 86 | +After you create changes on your branch create a Pull Request and mark it |
| 87 | +as a `Draft` as that it can be seen that you are working on a given issue. |
| 88 | +Similarly to creating an issue ensure that: |
| 89 | + |
| 90 | +* Summary of changes in the body of the pull |
| 91 | +* Labels |
| 92 | +* Milestone |
| 93 | +* Link related issues |
| 94 | +* Assign the project `rust-pip` |
| 95 | +* etc. |
0 commit comments