Learning GitHub Basics
As I have already written (two weeks ago), there are many reasons to participate in Open Source ecosystem. Now it's time to start doing it and time for some simple exercises with the Open Source project. However, before you submit your first commit to a well known project, you have to practice on your own repository in advance. My demonstration are based on the GitHub system, but it not only for it. Very similarly or even the same scenario will work with other cloud code repositories such as: GitLab or BitBucket.
Create the repossitory
How to create your own repository in the GitHub? There are two possibilities: starting from an empty repository and then add new files to them or just copy an existing repository to your account. Starting a new project from scratch requires a genius idea and a huge commitment, which is why I will encourage you to support an already existing project. Then I'm going to choose the second option because it will be closer to our future collaboration model in the Open Source Delphi world.
Fork the repo
We start with creating a copy of a known repository. As I have already mentioned in the previous post, I will illustrate my story with the examples based on the TChromeTabs repository. Then let's start. Go to the repository page: https://github.com/norgepaul/TChromeTabs
And press the button fork:
It can take a while to copy the repository and its assets. In practice, during this procedure, the internal Git repository is cloned on the GitLab servers infastructure. All file versions and the entire history log is transferred to current GitHub user account. Together, some of the GitHub specific resources are also copied, but not all of them, for example Issues are only available within the parent repository. During this procedure you can see:
When it's finished, you will see your own, new GitHub repository. In my case this is bogdanpolak/TChromeTabs. On the main page, bellow my repo name you can find link to the parent: norgepaul/TChromeTabs
Make some changes via Web page
How can you make any change in such a repository? It’s super easy. Just find the file, open it and edit. After making changes you have to commit them, but in advance you should type short and descriptive commit title. Naming commits is a very important skill that takes a long time to learn, but at the beginning it will not matter much to us. After approving the change, it only goes to your own repository not to parrent repository. You can check that your fix has been saved in the commit history. Previously, we had 144 commits, and now there are 145:
After clicking this [145 commits] link, you can see a detailed change log:
However, if you go to the parent repository and check the change log, you will see that your fix didn't hit there. The procedure for transferring changes from your GitHub repository to the parent one is called Pull Request and I will deal with it in one of the next posts.
Next time I'm going to focuss on the cooperation between RAD Studio IDE and our new repository, I'd like to discuss the concepts of the local and remote repository, which will allow in practice learn the principle of a DVCS = Distributed Versions Controlling System.
Please login first in order for you to submit comments
- Page :