Skip to content

Commit e10fd81

Browse files
authored
Merge pull request #6 from ibm-messaging/contributing
Update CONTRIBUTING.md
2 parents 0d1f6a9 + 9967062 commit e10fd81

1 file changed

Lines changed: 37 additions & 27 deletions

File tree

CONTRIBUTING.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,48 @@
22

33
Thank you for your interest in contributing to our open-source project, MQ-Ansible.
44

5-
To ensure that the codebase is always healthy and does not result in deployment issues when cloned and used, it is important that you pre-check your additions and updates for any potential code conflicts before uploading your changes to the GitHub Repository.
5+
To ensure that the codebase is always healthy and does not result in deployment issues when forked and used, it is important that you pre-check your additions and updates for any potential code conflicts before uploading your changes to the GitHub Repository.
66

77
Therefore, the following steps should be followed to submit your contributions:
88

9-
1. Clone the project and create a new branch
9+
1. Fork the repository
1010
2. Create and run Ansible Test Playbooks
11-
3. Commit changes to your branch
12-
4. Prepare a Pull Request
13-
5. Submit the Pull Request
11+
3. Commit/Push changes to your fork
12+
4. Create a Pull Request
1413

1514

16-
### 1. Clone the project and create a new branch
15+
### 1. Fork the repository
1716

18-
Once you have cloned the project, create a new branch by running:
17+
To fork the repository:
18+
- Get started by clicking on "Fork" from the top-right corner of the main repository page.
19+
- Choose a name and description for your fork.
20+
- Select the option "Copy the main branch only", as in most cases, you will only need the default branch to be copied.
21+
- Click on "Create fork".
22+
23+
Once you have forked the repository, you can then clone your fork to your computer locally. In order to do that:
24+
- Click on "Code" (the green button on your forked repository).
25+
- Copy the forked repository URL under HTTPS.
26+
- Type the following on your terminal:
1927

2028
```
21-
git checkout <your_branch_name>
29+
git clone <the_forked_repository_url>
2230
```
2331

24-
You can work locally and commit to your changes to your newly created branch. This will not impact the main branch. If you are looking to add all the files you have modified in a particular directory, you can stage them all with the following command:
32+
You can set up Git to pull updates from the MQ-Ansible repository into the local clone of your fork when you fork a project in order to propose changes to the MQ-Ansible repository. In order to do that, run the following command:
2533

2634
```
27-
git add .
35+
git remote add upstream https://github.com/ibm-messaging/mq-ansible
2836
```
2937

30-
If you are looking to recursively add all changes including those in subdirectories, you can type:
38+
To verify the new upstream repository you have specified for your fork, run the following command:
3139

3240
```
33-
git add -A
41+
git remote -v
3442
```
3543

36-
Alternatively, you can type _git add -all_ for all new files to be staged.
44+
You should see the URL for your fork as origin, and the URL for the MQ-Ansible repository as upstream.
45+
46+
Now, you can work locally and commit to your changes to your fork. This will not impact the main branch.
3747

3848
### 2. Create and run Ansible Test Playbooks
3949

@@ -51,44 +61,44 @@ subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'playbook_na
5161

5262
If the playbook runs successfully and no errors are displayed, then proceed to Step #3.
5363

54-
### 3. Commit changes to your branch
55-
56-
Once you are ready to submit your changes, ensure that you commit them to your branch with a message. The commit message is an important aspect of your code contribution; it helps the maintainers of MQ-Ansible and other contributors to fully understand the change you have made, why you made it, and how significant it is.
64+
### 3. Commit/Push changes to your fork
5765

58-
You can commit your changes by running:
66+
If you are looking to add all the files you have modified in a particular directory, you can stage them all with the following command:
5967

6068
```
61-
git commit -m "Brief description of your changes/additions"
69+
git add .
6270
```
6371

64-
Once you have committed, you can verify what Git will be committing with the git status command. At this point you can push the changes to the current branch of the main repository:
72+
If you are looking to recursively add all changes including those in subdirectories, you can type:
6573

6674
```
67-
git push --set-upstream origin <your_branch_name>
75+
git add -A
6876
```
6977

70-
### 4. Prepare a Pull Request
78+
Alternatively, you can type _git add -all_ for all new files to be staged.
7179

72-
Next, specify a new remote upstream repository to sync with the fork. This will be the original main repository that you forked from. You can do this by running the following command:
80+
Once you are ready to submit your changes, ensure that you commit them to your fork with a message. The commit message is an important aspect of your code contribution; it helps the maintainers of MQ-Ansible and other contributors to fully understand the change you have made, why you made it, and how significant it is.
81+
82+
You can commit your changes by running:
7383

7484
```
75-
git remote add upstream https://github.com/ibm-messaging/mq-ansible.git
85+
git commit -m "Brief description of your changes/additions"
7686
```
7787

78-
Now, commits to the main branch will be stored in a local branch called upstream/main. Switch to the local main branch of our repository:
88+
To push all your changes to the forked repo:
7989

8090
```
81-
git checkout main
91+
git push
8292
```
8393

94+
### 4. Create a Pull Request
95+
8496
Merge any changes that were made in the original repository’s main branch:
8597

8698
```
8799
git merge upstream/main
88100
```
89101

90-
### 5. Create a Pull Request
91-
92102
Before creating a Pull Request, ensure you have read the [IBM Contributor License Agreement](CLA.md). By creating a PR, you certify that your contribution:
93103
1. is licensed under Apache Licence Version 2.0, The MIT License, or any BSD License.
94104
2. does not result in IBM MQ proprietary code being statically or dynamically linked to Ansible runtime.

0 commit comments

Comments
 (0)