|
| 1 | +If you don't have git on your machine, [install it]( https://help.github.com/articles/set-up-git/). |
| 2 | + |
| 3 | +## Fork this repository |
| 4 | + |
| 5 | +Fork this repository by clicking on the fork button on the top of this page. |
| 6 | +This will create a copy of this repository in your account. |
| 7 | + |
| 8 | +## Clone the repository |
| 9 | + |
| 10 | +<img align="right" width="300" src="https://raw.githubusercontent.com/firstcontributions/first-contributions/master/assets/clone.png" alt="clone this repository" /> |
| 11 | + |
| 12 | +Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the clone button and then click the *copy to clipboard* icon. |
| 13 | + |
| 14 | +Open a terminal and run the following git command: |
| 15 | + |
| 16 | +``` |
| 17 | +git clone "url you just copied" |
| 18 | +``` |
| 19 | +where "url you just copied" (without the quote marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url. |
| 20 | + |
| 21 | +<img align="right" width="300" src="https://raw.githubusercontent.com/firstcontributions/first-contributions/master/assets/copy-to-clipboard.png" alt="copy URL to clipboard" /> |
| 22 | + |
| 23 | +For example: |
| 24 | +``` |
| 25 | +git clone https://github.com/this-is-you/App.git |
| 26 | +``` |
| 27 | +where `this-is-you` is your GitHub username. Here you're copying the contents of the minimal-portfolio repository on GitHub to your computer. |
| 28 | + |
| 29 | +## Create a branch |
| 30 | + |
| 31 | +Change to the repository directory on your computer (if you are not already there): |
| 32 | + |
| 33 | +``` |
| 34 | +cd App |
| 35 | +``` |
| 36 | +Now create a branch using the `git checkout` command: |
| 37 | +``` |
| 38 | +git checkout -b <add-your-new-branch-name> |
| 39 | +``` |
| 40 | + |
| 41 | +For example: |
| 42 | +``` |
| 43 | +git checkout -b add-macho-coder |
| 44 | +``` |
| 45 | +(The name of the branch does not need to have the word *add* in it, but it's a reasonable thing to include because the purpose of this branch is to add your name to a list.) |
| 46 | + |
| 47 | +## Make necessary changes and commit those changes |
| 48 | + |
| 49 | +Now open the project folder to make changes. |
| 50 | +Don't know what to change. Don't worry. |
| 51 | +Join our discord channel to discuss about the issue and its fix with the community. [Invite link](http://discord.disstreamchat.com). |
| 52 | +Or open the issues tab (right next to code tab) and pickup any `good first issue`. Properly understand the issue and put up a comment 'Assign this issue to me' if you to give a fix this issue. |
| 53 | + |
| 54 | + |
| 55 | +Now, save the file. |
| 56 | + |
| 57 | + |
| 58 | +If you go to the project directory and execute the command `git status`, you'll see there are changes. |
| 59 | + |
| 60 | + |
| 61 | +Add those changes to the branch you just created using the `git add` command: |
| 62 | + |
| 63 | +``` |
| 64 | +git add . |
| 65 | +``` |
| 66 | + |
| 67 | +Now commit those changes using the `git commit` command: |
| 68 | +``` |
| 69 | +git commit -m "Add <your-name> to Contributors list" |
| 70 | +``` |
| 71 | +replacing `<your-name>` with your name. |
| 72 | + |
| 73 | +## Push changes to GitHub |
| 74 | + |
| 75 | +Push your changes using the command `git push`: |
| 76 | +``` |
| 77 | +git push origin <add-your-branch-name> |
| 78 | +``` |
| 79 | +replacing `<add-your-branch-name>` with the name of the branch you created earlier. |
| 80 | + |
| 81 | +## Submit your changes for review |
| 82 | + |
| 83 | +If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button. |
| 84 | + |
| 85 | +<img style="float: right;" src="https://raw.githubusercontent.com/firstcontributions/first-contributions/master/assets/compare-and-pull.png" alt="create a pull request" /> |
| 86 | + |
| 87 | +Now submit the pull request. |
| 88 | + |
| 89 | +<img style="float: right;" src="https://raw.githubusercontent.com/firstcontributions/first-contributions/master/assets/submit-pull-request.png" alt="submit pull request" /> |
| 90 | + |
| 91 | +Soon I'll be merging all your changes into the master branch of this project. You will get a notification email once the changes have been merged. |
| 92 | + |
| 93 | +## Where to go from here? |
| 94 | + |
| 95 | +Congrats! You just completed the standard _fork -> clone -> edit -> PR_ workflow that you'll encounter often as a contributor! |
0 commit comments