Posted on 2/12/2024
Cloning, editing and pushing to GitHub is a great way to contribute to open source projects and build your portfolio at the same time. It’s also important to learn how to use git and GitHub because it’s a skill that is required for most jobs in the tech industry.
Let’s jump in! 🤿
Open the terminal on your computer and type the following commands:
cd Desktop
git clone https://github.com/sulamitaivanov/portfolio-website
Open the cloned folder in your code editor
Open the file you want to edit
💡 If you want to preview what you’re changing, open the terminal in the code editor and type npm i
then npm run dev
click on the link that appears in the terminal
Make changes to the code and save
Open terminal in code editor đź’ˇ control+ back tick symbol
git status
*optional
git add
add the name of the file you changed
OR git add .
to add all files
git status
*optional - to confirm that the file has been added
git commit -m "message"
git push -u origin main
💡 you can find the name of the branch on the repo page on GitHub. In this case the branch name is “main”
Refresh the page on GitHub and you should see your changes
You will see a message asking if you want to contribute the changes to the original repo
Select the “Contribute” button then “Open pull request” button
Confirm that the information is correct and click “Create pull request”
You will see a message saying that the pull request has been created
Congrats! You’ve just contributed to an open source project! 🎉