GitHub – Repositories, Forking, Branching, Etc.-ing

I’ve been busy researching GitHub and how Repositories, Forking, Branching and etc. work. It’s a bit confusing at the moment but shouldn’t be too difficult to grasp with a little use.

What I’ve learned – or at least attempted to learn thus far.

Repositories

Repositories are essentially remote servers where you are able to store your working files for various projects – in my case I would be storing html files, css files, javascript and other web development files. Once a repository is created you have the ability to clone it.

Cloning

Cloning is the duplication of a repository – whether yours or someone elses – to your computer locally. Once cloned you can modify the files locally, then on save the Window’s GitHub program will update and give you the option to commit the changes. Here you will input a summary and brief description of the new changes and then commit them and they will be uploaded to the remote repository – this way there is an ongoing record of changes and why the changes were made.

Forking

Forking from my understanding is the duplication of a Repository – personally owned or publicly hosted. Once duplicated you can modify the code for your needs or issue pull requests. Pull requests give you the ability to submit code changes such as a bug fix. If the change is accepted, the original owner of the repository can then merge the change(may be improper terminology here).

Finally we have Branching – for now.

Branching allows you to create a duplicate repository and safely make changes without effecting the master repository. Then if the changes are an improvement, you can merge the branch into the master.

Wrap up.

I have a general grasp of how GitHub works but will need to research further. I believe you can use GitHub at more of a command level, but I have only successfully cloned repositories thus far. Also, I am not sure how branches are effected once you’ve forked a repository.

Conclusion

I still have quite a bit to learn about GitHub, and although I do not push my posts, I would love to receive some corrections or guidance if you happen to pass by.

Leave a Reply