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
- Please **specify your full name** on your GitHub profile for review.
4
-
- Each participant will be assigned **2 issues (max)** at a time to work.
5
-
- Participants have **7 days** to complete issues.
6
-
- Participants have to **comment on issues** they would like to work on, and mentors will assign you.
7
-
- Issues will be assigned on a **first-come, first-serve basis.**
8
-
- Participants can also open their issues, but it needs to be verified and labelled by a mentor.
9
-
- Before opening a new issue, please check if it is already created or not.
10
-
- Share your **work sample** and discuss it before sending PR.
11
-
- Pull requests will be merged after being reviewed by a mentor/maintainer.
12
-
- Create a pull request from **a branch** not from **Main**.
13
-
- You will be **scored** based on the level of issues you have solved.
14
-
- It might take a day or tow to review your pull request. Please have patience and be nice.
15
-
- We all are here to learn. You are allowed to make mistakes. That's how you learn, right!
3
+
-Please **specify your full name** on your GitHub profile for review.
4
+
-Each participant will be assigned **2 issues (max)** at a time to work.
5
+
-Participants have **7 days** to complete issues.
6
+
-Participants have to **comment on issues** they would like to work on, and mentors will assign you.
7
+
-Issues will be assigned on a **first-come, first-serve basis.**
8
+
-Participants can also open their issues, but it needs to be verified and labelled by a mentor.
9
+
-Before opening a new issue, please check if it is already created or not.
10
+
-Share your **work sample** and discuss it before sending PR.
11
+
-Pull requests will be merged after being reviewed by a mentor/maintainer.
12
+
-Create a pull request from **a branch** not from **Main**.
13
+
-You will be **scored** based on the level of issues you have solved.
14
+
-It might take a day or tow to review your pull request. Please have patience and be nice.
15
+
-We all are here to learn. You are allowed to make mistakes. That's how you learn, right!
16
16
17
17
**Pull Requests review criteria:**
18
-
- Please mention parent issue no. with "**#**" in the description while sending a pull request.
19
-
- Your work must be original, written by you not copied from other resources.
20
-
- You must **comment** on your code where necessary.
18
+
19
+
- Please mention parent issue no. with "**#**" in the description while sending a pull request.
20
+
- Your work must be original, written by you not copied from other resources.
21
+
- You must **comment** on your code where necessary.
21
22
22
23
## GIT AND GITHUB
23
-
***
24
+
25
+
---
26
+
24
27
Before continuing we want to clarify the difference between Git and Github. Git is a version control system(VCS) which is a tool to manage the history of our Source Code. GitHub is a hosting service for Git projects.
25
28
26
29
We assume you have created an account on Github and installed Git on your System.
27
30
28
31
Now tell Git your name and E-mail (used on Github) address.
This is an important step to mark your commits to your name and email.
33
36
34
37
### FORK A PROJECT -
35
-
***
38
+
39
+
---
40
+
36
41
You can use github explore - https://github.com/explore to find a project that interests you and match your skills. Once you find your cool project to workon, you can make a copy of project to your account. This process is called forking a project to your Github account. On Upper right side of project page on Github, you can see -
Click on fork to create a copy of project to your account. This creates a separate copy for you to workon.
41
46
42
-
### FINDING A FEATURE OR BUG TO WORKON -
43
-
***
47
+
### FINDING A FEATURE OR BUG TO WORKON -
48
+
49
+
---
50
+
44
51
Open Source projects always have something to workon and improves with each new release. You can see the issues section to find something you can solve or report a bug. The project managers always welcome new contributors and can guide you to solve the problem. You can find issues in the right section of project page.
You have forked the project you want to contribute to your github account. To get this project on your development machine we use clone command of git.
### ADD A REMOTE (UPSTREAM) TO ORIGINAL PROJECT REPOSITORY
56
-
***
64
+
### ADD A REMOTE (UPSTREAM) TO ORIGINAL PROJECT REPOSITORY
65
+
66
+
---
67
+
57
68
Remote means the remote location of project on Github. By cloning, we have a remote called origin which points to your forked repository. Now we will add a remote to the original repository from where we had forked.
Open Source projects have a number of contributors who can push code anytime. So it is necessary to make your forked copy equal with the original repository. The remote added above called Upstream helps in this.
66
79
67
-
```$ git checkout master```
68
-
```$ git fetch upstream```
69
-
```$ git merge upstream/master```
70
-
```$ git push origin master```
80
+
`$ git checkout master`
81
+
`$ git fetch upstream`
82
+
`$ git merge upstream/master`
83
+
`$ git push origin master`
71
84
The last command pushes the latest code to your forked repository on Github. The origin is the remote pointing to your forked repository on github.
72
85
73
86
### CREATE A NEW BRANCH FOR A FEATURE OR BUGFIX -
74
-
***
87
+
88
+
---
89
+
75
90
Normally, all repositories have a master branch which is considered to remain stable and all new features should be made in a separate branch and after completion merged into master branch. So we should create a new branch for our feature or bugfix and start working on the issue.
76
91
77
-
```$ git checkout -b <feature-branch>```
92
+
`$ git checkout -b <feature-branch>`
78
93
This will create a new branch out of master branch. Now start working on the problem and commit your changes.
79
94
80
-
```$ git add --all```
81
-
```$ git commit -m "<commit message>"```
95
+
`$ git add --all`
96
+
`$ git commit -m "<commit message>"`
82
97
The first command adds all the files or you can add specific files by removing -a and adding the file names. The second command gives a message to your changes so you can know in future what changes this commit makes. If you are solving an issue on original repository, you should add the issue number like #35 to your commit message. This will show the reference to commits in the issue.
83
98
84
99
### REBASE YOUR FEATURE BRANCH WITH UPSTREAM-
85
-
***
100
+
101
+
---
102
+
86
103
It can happen that your feature takes time to complete and other contributors are constantly pushing code. After completing the feature your feature branch should be rebase on latest changes to upstream master branch.
87
104
88
-
```$ git checkout <feature-branch>```
89
-
```$ git pull --rebase upstream master```
105
+
`$ git checkout <feature-branch>`
106
+
`$ git pull --rebase upstream master`
90
107
Now you get the latest commits from other contributors and check that your commits are compatible with the new commits. If there are any conflicts solve them.
91
108
92
109
### SQUASHING YOUR COMMITS-
93
-
***
110
+
111
+
---
112
+
94
113
You have completed the feature, but you have made a number of commits which make less sense. You should squash your commits to make good commits.
95
114
96
-
```$ git rebase -i HEAD~5```
115
+
`$ git rebase -i HEAD~5`
97
116
This will open an editor which will allow you to squash the commits.
98
117
99
118
### PUSH CODE AND CREATE A PULL REQUEST -
100
-
***
119
+
120
+
---
121
+
101
122
Till this point you have a new branch with the feature or bugfix you want in the project you had forked. Now push your new branch to your remote fork on github.
102
123
103
-
```$ git push origin <feature-branch>```
124
+
`$ git push origin <feature-branch>`
104
125
Now you are ready to help the project by opening a pull request means you now tell the project managers to add the feature or bugfix to original repository. You can open a pull request by clicking on green icon -
0 commit comments