|
a |
|
b/docs/contributing/CONTRIBUTING.md |
|
|
1 |
# Steps to follow 📜 |
|
|
2 |
|
|
|
3 |
## 1. Fork it 🍴 |
|
|
4 |
|
|
|
5 |
You can get your own fork (copy) of [DNAnalyzer](https://github.com/VerisimilitudeX/DNAnalyzer) by using the `Fork` |
|
|
6 |
button at the top right of this page. |
|
|
7 |
|
|
|
8 |
 |
|
|
9 |
|
|
|
10 |
## 2. Clone it 👥 |
|
|
11 |
|
|
|
12 |
You must move to your fork of the repository and clone (download) it to your local machine using |
|
|
13 |
|
|
|
14 |
`$ git clone https://github.com/Your_Username/DNAnalyzer.git` |
|
|
15 |
|
|
|
16 |
This creates a local copy of the repository on your machine. |
|
|
17 |
|
|
|
18 |
After cloning the `DNAnalyzer` repository on GitHub, use the change directory command on Linux and Mac to go to that |
|
|
19 |
folder. |
|
|
20 |
|
|
|
21 |
```python |
|
|
22 |
# This will change directory to a folder DNAnalyzer |
|
|
23 |
$ cd |
|
|
24 |
DNAnalyzer |
|
|
25 |
``` |
|
|
26 |
|
|
|
27 |
Move to this folder for all other commands. |
|
|
28 |
|
|
|
29 |
Let us now add a reference to the original 'DNAnalyzer' repository using: |
|
|
30 |
|
|
|
31 |
`$ git remote add upstream https://github.com/VerisimilitudeX/DNAnalyzer.git` |
|
|
32 |
|
|
|
33 |
This adds a new remote named **_upstream_**. |
|
|
34 |
|
|
|
35 |
Examine the modifications using: |
|
|
36 |
|
|
|
37 |
```git |
|
|
38 |
$ git remote -v |
|
|
39 |
origin https://github.com/Your_Username/DNAnalyzer.git (fetch) |
|
|
40 |
origin https://github.com/Your_Username/DNAnalyzer.git (push) |
|
|
41 |
upstream https://github.com/VerisimilitudeX/DNAnalyzer.git (fetch) |
|
|
42 |
upstream https://github.com/VerisimilitudeX/DNAnalyzer.git (push) |
|
|
43 |
``` |
|
|
44 |
|
|
|
45 |
## 3. Sync with the Remote 🔄 |
|
|
46 |
|
|
|
47 |
Remember to keep your local repository up to date with the remote repository. |
|
|
48 |
|
|
|
49 |
```python |
|
|
50 |
# Fetch all remote repositories and delete any deleted remote branches |
|
|
51 |
$ git |
|
|
52 |
fetch - -all - -prune |
|
|
53 |
# Switch to main branch |
|
|
54 |
$ git |
|
|
55 |
checkout |
|
|
56 |
main |
|
|
57 |
# Reset local main branch to match upstream repository's main branch |
|
|
58 |
$ git |
|
|
59 |
reset - -hard |
|
|
60 |
upstream / main |
|
|
61 |
# Push changes to your forked DNAnalyzer repo |
|
|
62 |
$ git |
|
|
63 |
push |
|
|
64 |
origin |
|
|
65 |
main |
|
|
66 |
``` |
|
|
67 |
|
|
|
68 |
## 4. Create a new branch |
|
|
69 |
|
|
|
70 |
Whenever you want to make a contribution, use the following command to establish a new branch and keep your `main` |
|
|
71 |
branch uncluttered (i.e. synced with remote branch). |
|
|
72 |
|
|
|
73 |
```python |
|
|
74 |
# It will create a new branch <branchname> with name and switch to branch <branchname> |
|
|
75 |
$ git |
|
|
76 |
checkout - b < branchname > |
|
|
77 |
``` |
|
|
78 |
|
|
|
79 |
To switch to desired branch |
|
|
80 |
|
|
|
81 |
```python |
|
|
82 |
# To switch from one folder to other |
|
|
83 |
$ git |
|
|
84 |
checkout < branchname > |
|
|
85 |
``` |
|
|
86 |
|
|
|
87 |
To add the changes to the branch. Use |
|
|
88 |
|
|
|
89 |
```python |
|
|
90 |
# To add all files to branch |
|
|
91 |
$ git |
|
|
92 |
add. |
|
|
93 |
``` |
|
|
94 |
|
|
|
95 |
Type in a message relevant for the code reviewer using |
|
|
96 |
|
|
|
97 |
```python |
|
|
98 |
# This message get associated with all files you have changed |
|
|
99 |
$ git |
|
|
100 |
commit - m |
|
|
101 |
"relevant message" |
|
|
102 |
``` |
|
|
103 |
|
|
|
104 |
Now, Push your awesome work to your remote repository using |
|
|
105 |
|
|
|
106 |
```python |
|
|
107 |
# To push your work to your remote repository |
|
|
108 |
$ git |
|
|
109 |
push - u |
|
|
110 |
origin < branchname > |
|
|
111 |
``` |
|
|
112 |
|
|
|
113 |
Finally, in your browser, navigate to your repository and click `Contribute` and then `Open Pull Request`. There, please |
|
|
114 |
provide a title and description, with brevity, that describe your much-appreciated effort. |