Reputation: 1996
I have cloned someone's open source code hosted on github and made some changes to fix things on various platforms. I'd like to feed this back into the system. How do I contribute this into github so that others get the benefits?
Upvotes: 19
Views: 4337
Reputation: 28189
In github, you can send a pull request to patch code in someone else's project. I've started a project to help people making their first GitHub pull request. You can do the hands-on tutorial to make your first PR here
The workflow is simple as
git push origin branch-name
Compare and pull request
buttonUpvotes: 0
Reputation: 124646
I think you want to create a Pull Request.
UPDATE
If you don't have your fork on GitHub yet, then you have to create that first:
Upvotes: 28
Reputation: 1157
If you are contributor:
git branch [branch_name]
git add .
(adds all the new files) command to notify GIT of your new files. After this GIT will start tracking the new file.git commit -am "Commit message"
git push origin [branch_name]
PS: You are not allowed to make changes to the main branch(called master) on a public repository unless you are a contributor.
After this the admin will check the changes you have made and if he approves they will be merged with the master branch.
If you are not a contributor:
Create a pull request as suggested by @janos
I'm not sure if you are looking for a GIT tutorial but here is one to start with anyway. http://www.vogella.com/articles/Git/article.html
Upvotes: 1