DEV Community

Cover image for Git, GitHub, and Open Source Projects
CadenCGS
CadenCGS

Posted on

Git, GitHub, and Open Source Projects

Introduction

Git and GitHub are used world wide by almost any developer known to man. It is an extremely useful tool that lets developers work on the same file from different locations uploading and transferring the progress each time a developer finishes.

Git vs. GitHub

While both services appear to have the same function, there is a distinct different between the two. Git is open source, and installed on the local machine. Conversely, GitHub is not open source, and is an online service, utilized through a web browser

Git Commands and Interaction with GitHub

-clone: clone is used to clone, or duplicate, an already existing repository into your editor or files

-push: This can be used to push or send your updated but not uploaded files to the GitHub repository

-pull: Conversely from push, pull can rip or take files from the uploaded repository down into you files for editing

-add: Adds a file to you local machine to later be uploaded to the repository

-commit: Uploads the pushed files to the GitHub repository

-branch: Displays all branches within the current repository

-checkout: Changes the current branch that is being worked on to a different branch to work on

GitHub Change Tracking

GitHub also helps developers interact but showing change logs and other useful information within the files. It has useful features such as showing other users what was deleted, added, and comments that are made by the developer who made said changes.

GitHub Branches

Branches are one of the best ways to utilize workflow in GitHub. The main branch, called master, is what is always seen as the actual working and functioning product. Branches can be utilized in order to work on files in the master branches without breaking the rest of a project. They are most commonly used when developers are looking into fixing bugs or creating/testing a new feature that is being added.

Contributing to open Source

Open source is meant to be treated as a coding playground of sorts. It is a place where you can have fun, experiment, and try new things, without worry of judgment or fear of being wrong. Open source projects are places for people to use to become better then they already are, expanding their limits and becoming a better coder. While most of not all open Source project have instructions, this is to keep challenging you to be the best coder you can be, and to also avoid committing something that breaks the project.

When starting an Open Source project, you use a GitHub project called Fork. Forking clones the entire repository and makes a copy that you own and can edit.

Sources

Information: Udemy "The Complete Web Developer 2021: Zero To Mastery" course by Andrei Neagoie
My Class Teacher: Matthew Larrubia

Top comments (0)