Hello everyone. Today I'm going to make a tutorial on contributing to someones repository on Github. Since many people are now using it (and many have no idea how to use it) this tutorial will help you.
First go to github.com and create an account:
Lets get our tools now:
Now lets go to a repository we would like to contribute to like this one by @Printer. Now look at the top and press the fork button
It will process for a bit the it will be ready.
Type:
Before we continue lets go into the folder we cloned:
Now you have a copy of the repo you forked. Lets create a link between our fork and the one we want to contribute to with this command:
Now go to wherever you saved the repository you want to contribute to and do all the changes you planned.
You can see whats been changes and what as not been added bu using the command:
It will print out something like this if you are on a windows machine:
When you are finished you are ready to upload or "commit" your changes, this is how to do it:
Type:
The default text editor will open up. Add some notes here to tell other users what you have done.
Save the document (CTRL +S), close notepad and go back to the terminal
Now to make your changes affect the fork on Github you must execute this:
Now we are ready to make a pull request. Go to your forked repository on Github. See that we successfully pushed our commit/s
Now go to the original repository and find this green button:
Press "compare across forks"
and find your fork:
Now press that big "Create a Pull Request" button
Now write a small comment to describe the changes in this pull request:
Once its done send it!
Your pull request will remain
till the owner or a contributor accepts it. Once its accepted it will be
. You will also get an email depending on your Github settings.
And thats it! You have successfully contributed to making a project better.
Credits to @Printer for letting me use his repo so many times
First go to github.com and create an account:
Lets get our tools now:
- On windows you can get the get the github client for windows here
- On Debian/Ubuntu you can do "apt-get install -y git"
- On Fedora you can do "yum install -y git"
- On a Mac you can get the git-scm tool from here
Now lets go to a repository we would like to contribute to like this one by @Printer. Now look at the top and press the fork button
It will process for a bit the it will be ready.
- Now open a terminal. In Linux/Mac/Cygwin you can just open up a terminal and work with git as long as you installed it properly.
- On Windows open the Git Shell:
Type:
Code:
git clone https://github.com/"your username"/FORGOTTENSERVER-ORTS
Before we continue lets go into the folder we cloned:
Code:
cd FORGOTTENSERVER-ORTS
Now you have a copy of the repo you forked. Lets create a link between our fork and the one we want to contribute to with this command:
Code:
git remote add PrinterLUA git://github.com/PrinterLUA/FORGOTTENSERVER-ORTS.git
Now go to wherever you saved the repository you want to contribute to and do all the changes you planned.
You can see whats been changes and what as not been added bu using the command:
Code:
git status
When you are finished you are ready to upload or "commit" your changes, this is how to do it:
Type:
Code:
git commit -a
Save the document (CTRL +S), close notepad and go back to the terminal
Now to make your changes affect the fork on Github you must execute this:
Code:
git push
Now we are ready to make a pull request. Go to your forked repository on Github. See that we successfully pushed our commit/s
Now go to the original repository and find this green button:
Press "compare across forks"
and find your fork:
Now press that big "Create a Pull Request" button
Now write a small comment to describe the changes in this pull request:
Once its done send it!
Your pull request will remain
And thats it! You have successfully contributed to making a project better.
Credits to @Printer for letting me use his repo so many times
Last edited: