Skip to content

Commit ba11c2b

Browse files
authored
Update Developing-SU2-on-GitHub-(Internal-Developers).md
1 parent 6c1e62c commit ba11c2b

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

_docs_v7/Developing-SU2-on-GitHub-(Internal-Developers).md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,49 +29,52 @@ Now that you have a local copy of SU2 from the GitHub repository, you can begin
2929

3030
Please read the "Code Reviews" section of the wiki before making changes to familiarize yourself with the requirements for a good code change.
3131

32-
We follow the popular "GitFlow" branching model for scalable development. In the SU2 repository, the master branch represents the latest stable major or minor release (7.0, 6.2.0, etc.), it should only be modified during version releases. Work that is staged for release is put into the develop branch via Pull Requests (to be discussed in a moment) from various "feature" branches where folks do their day-to-day work on the code. At release time, the work that has been merged into the develop branch is pushed to the master branch and tagged as a release.
32+
We follow the popular ["GitFlow"](https://nvie.com/posts/a-successful-git-branching-model/) branching model for scalable development. In the SU2 repository, the master branch represents the latest stable major or minor release (7.0, 6.2.0, etc.), it should only be modified during version releases. Work that is staged for release is put into the develop branch via Pull Requests (to be discussed in a moment) from various "feature" branches where folks do their day-to-day work on the code. At release time, the work that has been merged into the develop branch is pushed to the master branch and tagged as a release.
3333

3434
When a repository is cloned, all of the branches are as well, and so no additional work is necessary to acquire the development branch. However, you must tell git to switch to the development branch, which can be done with the "checkout" command
3535
```
3636
git checkout -b develop origin/develop
3737
```
38+
39+
40+
### Opening a Pull Request ###
41+
3842
Now that changes will be on top of the development branch, code changes can be made. This next section describes the steps for creating a pull request.
3943

4044
1. Create a new branch for making your changes.
4145
```
42-
git checkout -b fixquadvol
46+
git checkout -b fix_quadvol
4347
```
44-
Additionally, create a branch with the same name on the SU2 github repository. First, make sure the current SU2 branch is set to develop
45-
46-
![Develop Branch](../../docs_files/pr_develop_branch.png)
48+
Additionally, create a branch with the same name on the SU2 github repository. First, make sure the current SU2 branch is set to develop
4749
48-
then create a new branch with the appropriate name.
50+
![Develop Branch](../../docs_files/pr_develop_branch.png)
4951
50-
![Create Branch](../../docs_files/pr_create_branch.png)
52+
then create a new branch with the appropriate name.
5153
52-
53-
1. Make changes to the existing files (using your favorite text editor or integrated development environment, IDE) or add local files or folders to be tracked and compared against the global repo files.
54+
![Create Branch](../../docs_files/pr_create_branch.png)
55+
56+
Depending on whether your branch name starts with `fix_`, `feature_` or `chore_`, if you open a pull request for that branch, it will automatically get the label `fix`, `feature` or`chore`, respectively. Once it is merged, this label and the title of your PR will be used to generate a change log for the next release.
57+
58+
2. Make changes to the existing files (using your favorite text editor or integrated development environment, IDE) or add local files or folders to be tracked and compared against the global repo files.
5459
5560
```
5661
git add file1.cpp file2.cpp
5762
```
5863
59-
2. Optionally check that your changes have been registered and/or the files that you want have been added added
64+
3. Optionally check that your changes have been registered and/or the files that you want have been added added
6065
6166
```
6267
git status
6368
```
6469
65-
3. Commit the changes to your local repository (not the global repository on GitHub) and create a descriptive message about your change. Commit messages are the easiest tool for examining past code changes, so it is important that they serve as documentation. A good commit message will consist of a short descriptive message on the first line, followed by a longer descriptive message. If the PR addresses any issues, they should be identified in the commit message. A good (fake) commit message is below.
70+
4. Commit the changes to your local repository (not the global repository on GitHub) and create a descriptive message about your change. Commit messages are the easiest tool for examining past code changes, so it is important that they serve as documentation. A good commit message will consist of a short descriptive message on the first line, followed by a longer descriptive message. If the PR addresses any issues, they should be identified in the commit message. A good (fake) commit message is below.
6671
6772
```
68-
git commit -m "Fix computation of the volume for skewed quadrilateral elements.
69-
70-
If a 2-D quadrilateral element is sufficiently skewed, the volume approximation is not computed properly. This modifies the volume computation to use the base and height of the quadrilateral instead of the base and hypotenuse. This fixes cases where the volume was incorrectly computed to be less than zero.
71-
72-
Fixes issue 10."
73+
git commit -m "Fix computation of the volume for skewed quadrilateral elements." \
74+
-m "If a 2-D quadrilateral element is sufficiently skewed, the volume approximation is not computed properly. This modifies the volume computation to use the base and height of the quadrilateral instead of the base and hypotenuse. This fixes cases where the volume was incorrectly computed to be less than zero. Fixes issue #10."
7375
```
7476
77+
7578
4. Push the code to the remote version of the branch on GitHub
7679
7780
```
@@ -80,9 +83,9 @@ Fixes issue 10."
8083
8184
5. This will automatically register on github, and you can use the online API to make a pull request
8285
83-
![Submit Request 1](../../docs_files/pr_submit_request_1.png)
86+
![Submit Request 1](../../docs_files/pr_submit_request_1.png)
8487
85-
![Submit Request 2](../../docs_files/pr_submit_request_2.png)
88+
![Submit Request 2](../../docs_files/pr_submit_request_2.png)
8689
8790
6. Now your code is available for code review!
8891

0 commit comments

Comments
 (0)