based on: @cataplintit
Learn how to contribute to open-source projects. π
You'll learn the git workflow required to contribute to open-source projects. β‘
For git basics & tips & tricks - click me! π±οΈ
π Go to the end of the file to see who contributed! π
- The git workflow required for working on open-source projects
- Working in a team
- How to use git
- How to code
Fork this repository by clicking on the fork button.
When you fork a repository, you simply create a copy the repo on your account.
The next step is to clone the repository to your machine, so you can make changes.
To do so, go into the repo you just forked into your account, then click the button called Clone or download.
Copy the link, and run this in your terminal:
git clone <the-url-you-just-copied>
In my case, it would be:
git clone https://github.com/imjoseangel/open-source-contribution.git
In your case, you would replace imjoseangel with your username.
First of all, open the repository in your editor.
Then, create a branch as follows:
git checkout -b <enter-your-branch-name>
An example would be:
git checkout -b "Added_My_Name_To_README"
The name of your branch should be short and descriptive. The branch above is just an example, but it can be called however you want.
It should describe the purpose of your changes though. I chose that name because I added my name to the README (what you'll do as well).
- Open the file called
README.md
- Find the CONTRIBUTORS section.
- Add your name RANDOMLY in the list to avoid merge conflicts
Once you have added your name and Twitter handle, run in your terminal:
-
git add README.md
(it represents the file where you made the change) -
git commit -m "Added my name and twitter handle"
(this represent the message that explains what you did) -
git push origin <your-branch-name>
(push your changes to Github)
The purpose of a pull request is to show to other developers the changes you did.
Also, they review your code to make sure your code is optimal.
- Once you pushed your changes to Github, go to the repo and click on
Compare & pull request
.
- Add a descriptive title and description
-
Click on
Create pull request
. -
Wait for me to merge your changes to the master change. They will become live once I merge them.
Congratulations! This is the required Git workflow to contribute to open source projects.
Go over my repos, and if you see any typos & programming bugs/errors, open a PR. π₯³
Add your name and Twitter handle. π¦
- Jose Angel ππ‘ => Twitter: @imjoseangel π¦