Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I contribute a patch to github?

Tags:

github

I don't want to fork a project, but I would like to submit patches for inclusion; should I do this on the issue queue?

like image 960
cjm2671 Avatar asked Oct 16 '11 14:10

cjm2671


People also ask

How do I contribute to someone else's GitHub repository?

Go into the directory for your project. Add a connection to your friend's version of the github repository, if you haven't already. Pull his/her changes. Push them back to your github repository.


2 Answers

You should fork the project. In Github, this is very cheap. This way, you can push your changes how you want to your repository, and then make a pull request to have them included in the official repository.

You can then delete your fork after that.

like image 86
Artefact2 Avatar answered Nov 01 '22 16:11

Artefact2


If you don’t fork a project, that means:

  • you clone the original repo directly;
  • you cannot push directly back to it (because you are not declared as a contributor).

Then you can indeed use the issue queue to reference a patch.
If said patch isn’t too big, you can directly copy/paste its textual form.
If not, you can copy it to some pastebin site and link it from your issue ticket.

like image 27
VonC Avatar answered Nov 01 '22 16:11

VonC