I'm fairly new to GitHub, so I hope you can help out. There's a branch on a repo that I want to push changes to, but I'm not added as a collaborator on it. What steps do I need to take to push changes to that branch?
I have done some research and found that I may need to fork the repo, make changes locally then create a pull request, but I'm still a bit confused about it. I would appreciate any help.
You can't simply push to the branch which you dont have the write access. You can simply fork the repo by clicking it fork button. Then clone the repo locally by using the command below
git clone https://github.com/your-username/project.git
Then you need to checkout to the branch which you need to make the change just use:
git checkout branch_name
Then make the necessary changes. Now you will have to commit the changes:
git add --all .
git commit -m "changes description"
git push
Now visit the repository in your profile. You can see a notification to open a new pull request.
Please see this for more info: https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With