This repository is created for beginners (students) to learn how to contribute to open source projects on github by learning how to raise the Pull Request. (inspired from Syknapse's repositry)
- Have a GitHub account (if not then you can refer to this to create your github account)
- Have git installed on your local machine (if not you can download it from here)
- Have a IDE/Text editor (If you use VS Code it comes with integrated Git and allows you to do what we need straight from the editor)
-
- The objective here is to make a copy of this project and place it in your account.
- Make sure you are on the main page of this repo.
- Fork the repository by clicking on fork button seen in right corner of the screen (image)
- You now have a complete copy of the project in your own account.
-
- Now we want to make a local copy of the project. That is a copy saved on your own machine.
- Open any folder where you want to clone the repository.
- Then you can right click and select Git Bash here option
- then type
git clone yourlink
and press enter - Replace yourlink with the link of your repository which you can get as shown in image below
-
- Then you will need to type
cd Contribute-your-card
and press enter to go to that folder/repo. - and type
git checkout YourName-dev
and press enter example:git checkout Atharva-dev
- This will create a branch named "YourName-dev" and switch to that branch.
- Then you will need to type
-
- Once this all is done you can open the index.html file in your preferred IDE/Text Editor
- and Copy the Template shown in the Image.
- Paste it below the code shown in image by having one space between the above code.
- (NOTE - YOUR CARD MUST BE ON THE TOP and BELOW THE TEMPLATE and COMMENTS)
- Make the changes by adding your information to the card.
- Replace name by Your name by your own name.
- Roll no with your own roll no (your college roll no) (you can leave it blank if you dont have one)
- Replace Class with your class followed by college name (example: SY MCA, MES IMCC) (you can leave it blank if you dont have one)
- You can share your socials by modifying the below snippet which is present in template (You can add multiple socials by modifying
<i class="fab fa-twitter">
with your desired social media (example :<i class="fab fa-linkedin">
) ) -<p class="contact"> <i class="fab fa-twitter"></i> <a href="www.twitter.com" target="_blank">Your handle</a> </p>
- Add your three favourite (programming) languages (by modifying the title and text)
- Last Step would be modifying the start and end title with yourName i.e.
<!-- ________ *TEMPLATE: MAKE A COPY* Contributor card START ________ -->
<!-- ________*END TEMPLATE* Contributor card END ________ -->
with your own name (example:<!-- ________ *Atharva's card START ________ -->
<!-- ________ *Atharva's card END ________ -->
).
- SAVE THE FILE.
-
- Go to the cmd (opened previously) or you can open new cmd with the location of your repository.
- Check the branch by executing
git branch
you should see your branch with asterisk in front of it example :*YourName-dev
- Which means the branch in which you are present is your.
- Now type
git add index.html
and press enter which will add your file to staging area - Once that is done, to commit the file, type
git commit -m "YourName's card added"
and press enter. - after that type
git push --set-upstream origin BranchName
and press enter (example :git push --set-upstream origin Atharva-dev
). - CHANGES FOR PUSHED TO YOUR REPO.
Now you know how to raise a PR :) You can check your card here