|
| 1 | +# First Contribution |
| 2 | +<p>This project is for those who are new to open-source and looking for make their first contribution.<p> |
| 3 | +<p>Follow the steps below :- </p> |
| 4 | + |
| 5 | +*** |
| 6 | + |
| 7 | +# Git Setup Guide |
| 8 | +## To initialise Git, write |
| 9 | +```bash |
| 10 | +git init |
| 11 | +``` |
| 12 | + |
| 13 | +## 1. Configure your local Git |
| 14 | +```bash |
| 15 | +git config --global user.name "github username" |
| 16 | +``` |
| 17 | + |
| 18 | +```bash |
| 19 | +git config --global user.email "email address" |
| 20 | +``` |
| 21 | + |
| 22 | +## 2. Go to the first-contribution repository and Fork it. |
| 23 | +* A fork is a rough copy of a repository. Forking a repository allows you to freely test and debug with changes without affecting the original project. One of the excessive use of forking is to propose changes for bug fixing. |
| 24 | + |
| 25 | + |
| 26 | +* Click on Code Button and copy the URL of your forked Repository |
| 27 | + |
| 28 | + |
| 29 | +## 3. Switch to your Git bash window, and enter the following : |
| 30 | + |
| 31 | +* Clone the Forked project on your local system |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +* Make the changes |
| 36 | + |
| 37 | + |
| 38 | +## 4. Creating a Pull request |
| 39 | +### Create a branch |
| 40 | + |
| 41 | +* A branch is designed to encapsulate a group of changes. These changes might be thrown away, entirely rewritten or in the majority of cases they’ll be promoted into the main history of the codebase - via a merge. |
| 42 | + |
| 43 | + |
| 44 | +* Creating a branch |
| 45 | + |
| 46 | +```bash |
| 47 | +git branch branch_name |
| 48 | +``` |
| 49 | + |
| 50 | +* Checkout to the created branch |
| 51 | + |
| 52 | +```bash |
| 53 | +git checkout branch_name |
| 54 | +``` |
| 55 | + |
| 56 | + |
| 57 | +* Now add the files using the git command |
| 58 | + |
| 59 | +```bash |
| 60 | +git add . |
| 61 | +``` |
| 62 | +* Commit the changes to the local project |
| 63 | + |
| 64 | +```bash |
| 65 | +git commit -m "Added my data" |
| 66 | +``` |
| 67 | + |
| 68 | +* Push the changes to your forked github repo |
| 69 | +```bash |
| 70 | +git push origin branch_name |
| 71 | +``` |
| 72 | + |
| 73 | +## 5. Final Steps |
| 74 | +* Open your forked git repository, you will get a message like as shown in the figure (if not then refresh the page). |
| 75 | + |
| 76 | +- Click on "Contribute" |
| 77 | +- Now click on "Open pull request" |
| 78 | +- Click on "Create pull request" |
| 79 | +- Click on "Create pull request" |
| 80 | +- You will get message which says that you have sucessfully made a pull request ! |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
0 commit comments