You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+37-27Lines changed: 37 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,38 +2,48 @@
2
2
3
3
Thank you for your interest in contributing to our open-source project, MQ-Ansible.
4
4
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.
6
6
7
7
Therefore, the following steps should be followed to submit your contributions:
8
8
9
-
1.Clone the project and create a new branch
9
+
1.Fork the repository
10
10
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
14
13
15
14
16
-
### 1. Clone the project and create a new branch
15
+
### 1. Fork the repository
17
16
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:
19
27
20
28
```
21
-
git checkout <your_branch_name>
29
+
git clone <the_forked_repository_url>
22
30
```
23
31
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:
If the playbook runs successfully and no errors are displayed, then proceed to Step #3.
53
63
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
57
65
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:
59
67
60
68
```
61
-
git commit -m "Brief description of your changes/additions"
69
+
git add .
62
70
```
63
71
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:
65
73
66
74
```
67
-
git push --set-upstream origin <your_branch_name>
75
+
git add -A
68
76
```
69
77
70
-
### 4. Prepare a Pull Request
78
+
Alternatively, you can type _git add -all_ for all new files to be staged.
71
79
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.
git commit -m "Brief description of your changes/additions"
76
86
```
77
87
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:
79
89
80
90
```
81
-
git checkout main
91
+
git push
82
92
```
83
93
94
+
### 4. Create a Pull Request
95
+
84
96
Merge any changes that were made in the original repository’s main branch:
85
97
86
98
```
87
99
git merge upstream/main
88
100
```
89
101
90
-
### 5. Create a Pull Request
91
-
92
102
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:
93
103
1. is licensed under Apache Licence Version 2.0, The MIT License, or any BSD License.
94
104
2. does not result in IBM MQ proprietary code being statically or dynamically linked to Ansible runtime.
0 commit comments