first-pr-Hacktoberfest -2019
First Contributions
It’s not an easy task for a learner to implement things in the right way at one shot and difficult for learners to go in a correct path by following certain rules initially. Learners make mistakes and one learns from his/her mistake. So, we want to help the new-come learners to contribute to open source by making their first contribution. There is nothing more efficient way of learning new stuff than implementing it. As the saying goes “practise makes a man perfect”, the more we contribute to open source, the more we shall get used to its advantages. We shall, therefore, learn to contribute to the open-source GitHub by following the given steps below.
Fork this repository
Now, forking seems easy! Just click on right top fork button and get a copy of the repository in your account easily done.
Clone the repository
Next, to clone the forked repository just go your GitHub account, open the forked repository, them the copy to clipboard icon is pressed under the clone or download button in the forked repository. Open a terminal and run the following git command:
git clone "URL you copied"
where "URL you just copied" (without the quote marks) is the URL to this repository (your fork of this project).
Create a branch
Change to the repository directory on your computer (if you are not already there):
cd first-pr-Hacktoberfest--2019
Now create a branch using the git checkout command:
git checkout -b <add-your-new-branch-name>
write the branch name without brackets.
Make necessary changes and commit those changes
Go to freshers
folder.
In the contributor_list.md
add your name and git account.
Then move into json folder open the gitcommands.json
file and write any git commad you understood and describe it in one line.
After necessary changes are made save them and in terminal type git status
.
Now you need to add them.
git add freshers
cause the folder you edited is named as freshers.
If you go to the project directory and execute the command git status, you'll see there are changes.
git commit -m "Briefly explain what you did"
Push changes to GitHub
Push your changes using the command git push:
git push origin <add-your-branch-name>
Replacing <add-your-branch-name>
with the name of the branch you created earlier.
Submit your changes for review
If you go to your repository on GitHub, you'll see a Compare & pull request button. Click on that button. Now submit the pull request.
Where to go from here?
Congrats! You just completed the standard fork -> clone -> edit -> PR workflow that you'll encounter often as a contributor! Now its time to practice some more PR workflow using different repositories.