How to Create and Clone a Repo in GitHub on Ubuntu 18.04

Reading Time: 3 minutes

GitHub is a free repository hosting service, used as version control for web developers to download and push their code from their servers to other users.  In our previous article we’ve instructed on how to add Git to your Ubuntu VPS server. We’ll continue on and show you how to add and clone a repo from GitHub to your server.

Continue reading “How to Create and Clone a Repo in GitHub on Ubuntu 18.04”

What is the Difference Between Git and GitHub? 

Reading Time: 4 minutes

What is Git?

gitlogo

Git is a distributed version control system (or VCS), typically used to track files changes. It was developed in 2005 by Linus Torvalds, the creator of the Linux kernel. Git’s primary use is to keep track of changes within source code during the software development process. Source Code Management or SCM was the primary reason for its creation.

Git is not the only available VCS, but it certainly is the most popular ones. This is primarily due to it being a free, open-source, multi-platform, highly integrable, and relatively simple platform to use. In this article, we will learn a bit about version control systems and what Git and GitHub are. We will also review how they work together. At its core, a version control software allows us to keep track of code changes. This way, we can see and evaluate the differences between multiple iterations or revisions of files.

Here is a typical use case. Let’s say we created a website and it’s working fine, even after a few updates! One day, we make some small changes to the site, and suddenly, it breaks. Typically, we would have to remember all the changes we made in the previous update. Then, go back and revert them all manually. Git, on the other hand, shows us exactly what changes we made including which files. This makes it much easier to track down the problem. We could also directly reverse the earlier changes and revert any updates which may have caused the issue. To accomplish this, Git uses repositories. 

What is a Git Repository?

A Git Repository (or repo, for short) is essentially the folder where our project is located. It also includes a .git directory containing all of our project files’ revision history. There are two types of repos:

  • Local repository — This folder contains all the files on our local computer where we do our work.
  • Remote repository — This is an off-site repository. It is usually located on the server where our project lives. It may also reside on a repository hosting service like GitHub.

Using remote repositories is one of the critical functionalities of Git. It expands on its use as a VCS and turns it into a collaborative tool. Complex projects usually have multiple people working on them. A remote repository stores our shared project code in one location. Additionally, it also keeps track of who made what changes and when. 

git-github

Distribution

We mentioned earlier that Git is a distributed VCS. To explain this concept, we need to take a look at two other types of version control systems:

  • Local VCS: This is the earliest and most basic form of VCS. Usually, these are simply a database that keeps track of changes made to a set of files on a local computer. These do not work very well when multiple developers are working on a project.
  • Centralized VCS This is a step up from a local VCS. The project and its version database are kept in a single location, typically on a server. Collaborators can “check out” the files they need to work on. This is similar to checking out a book from the library. Assuming libraries allowed you to modify and update the contents of a book. 

However, should the central server become unavailable or fail, the whole project is halted or lost. Unless a backup system is in place, distributed VCS’s come into play. Using Git or another DVCS, each user’s local repository contains a full copy of all the project files. It also contains the entire revision history. Every user has a complete backup of the data. Should any critical failures occur, the project can be quickly restored. 

Branching

Another essential feature of VCS is branching. Branching is defined as separating work from the main project to modify project code without impacting the main (master) branch. This feature is especially useful when testing and implementing new features, or trying alternative solutions for a problem or task. If that branch is improved, it then will be applied to the master branch, and merged into it. The Git branching system is renowned for being lightweight and quick. In fact, branching and merging is encouraged as part of the workflow.

What is GitHub?

GitHub is a repository hosting service. While we haven’t covered specific git commands or workflows in this particular article, we should note a few critical points:

githubloogo
  • Git is a standalone software that needs to be installed. The installation will differ between different operating systems. It is best to check what needs to be done to get Git up and running on our specific system.
  • Git is often used via the CLI (Command Line Interface). Both built-in and third-party GUI (Graphical User Interface) tools are also available.
  • Another popular way of using Git is directly through a text editor or IDE. Many IDEs natively support Git. Others may require the installation a plugin or adding an extension. A few examples of this are:
    • Sublime
    • Atom
    • NetBeans
    • Eclipse
    • Microsoft Visual Studio
    • Visual Studio Code
    • Notepad++
    • VSCodium

Repositories

When working on a project independently, using Git and setting up a remote repository is always a good idea. It is better to have a revisioning system to use as a backup, then to waste time rebuilding lost data.

We should also keep in mind whether we want our project to be publicly available (open-source) or private. GitHub offers both options as a means to either share your code or keep it confidential

Conclusion

To answer our original question What is the difference between Git and GitHub?

The simple answer is that Git is a version control system which lets us manage and track the history of our source code. GitHub is the cloud-based storage medium which allows us to keep those changes in a remote repository. Using both Git and GitHub together is a sensible choice for maintaining the ongoing development of a code base.

Learn More

We pride ourselves on being The Most Helpful Humans In Hosting™!

Our Support Team is full of experienced Linux technicians and talented System administrators who have intimate knowledge of multiple web hosting technologies, especially those discussed in this article.

Should you have any questions regarding this information, we are always available to answer any inquiries with issues related to this article, 24 hours a day, 7 days a week 365 days a year.

If you are a Fully Managed VPS server, Cloud Dedicated, VMWare Private Cloud, Private Parent server, Managed Cloud Servers, or a Dedicated server owner and you are uncomfortable with performing any of the steps outlined, we can be reached via phone @800.580.4985, a chat or support ticket to assisting you with this process.

The Top 5 Git Best Practices For Success

Reading Time: 4 minutes

What is Git?

31920.github

Git is the most commonly used VCS (Version Control System) today. Git is a free distributed version control system used for tracking changes in source code during development. It is installed and maintained on your local system. It is designed mainly for orchestrating work among developers. But, it can also be used for tracking changes in any set of files.

We can commit your work locally, and if everything is working as expected, it can be synced on the server. Because of Git’s popularity, help is easy to get when it’s needed. Also, the Git community has many resources for learning Git online. 

Continue reading “The Top 5 Git Best Practices For Success”

How to Commit and Push Changes from Ubuntu 18.04 to GitHub

Reading Time: 2 minutes

In our previous tutorial, we showed you how to create and sync a GitHub repository to your Ubuntu VPS server.  Using the last tutorial as a springboard, we’ll continue on and show you how to commit and push a script from your Ubuntu server to your GitHub account.

Continue reading “How to Commit and Push Changes from Ubuntu 18.04 to GitHub”

How To Install Git on Ubuntu 16.04 LTS

Reading Time: 2 minutes

Git is one of the most popular tools used as a distributed version control system (VCS). Git is commonly used for source code management (SCM) and has become more used than old VCS systems like SVN. In this article, we’ll show you how to install Git on your Ubuntu 16.04 cloud dedicated server.

Continue reading “How To Install Git on Ubuntu 16.04 LTS”

Little Known Ways To Utilize GitHub Gists

Reading Time: 5 minutes

What is Gist?

Gist is an easy method to share snippets or excerpts of data with others. A gist can be a string of code, a bash script or some other small piece of data. These bits of information are hosted by GitHub as a repository. Using gist has all the benefits of utilizing a GitHub repository, and also provides a more lightweight way of utilizing GitHub’s versioning features. 

Continue reading “Little Known Ways To Utilize GitHub Gists”

How to Install and Use Git-Secret

Reading Time: 3 minutes

What is Git-Secret?

Git-secret is a bash tool that is used to store your private files and information inside of a git repo on your server. The git-secret tool allows us to encrypt sensitive files that are stored inside a secure, encrypted repository. In this article, we will be examining the process of installing and working with git-secret on an 18.04 Ubuntu Server.

Continue reading “How to Install and Use Git-Secret”

How To Clone A Git Repo on CentOS

Reading Time: 8 minutes

In this article, we discuss how to clone a git repo on CentOS. We also learn the differences between Git and GitHub, what version control means, what a repo is and how to clone a repository.

Continue reading “How To Clone A Git Repo on CentOS”

Install and Configure Git on Ubuntu 18.04

Reading Time: 1 minute

What is the purpose of Git?

Git gives you a way to not only track changes in source code, but it can also be used to track changes in files.  It then stores the data in what is called a repository, also known as a repo. Continue reading “Install and Configure Git on Ubuntu 18.04”

Selling digital products with WooCommerce

Reading Time: < 1 minuteSo far, we’ve covered a good variety of WooCommerce topics – we touched on order management, product creation and shop customizing. One scenario we haven’t covered yet is selling non-physical products. For example, what would you do if you needed to sell a subscription or a digital download?

In this article we’ll quickly go over how you can setup digital products for download. These are products that are not shipped to the user but rather an item they download – like an eBook.

How can I add digital download products to my store?

You can add a digital download product the same way as you would a simple product or a variable product. The only big difference is that you need to mark it as ‘downloadable’. Next you need to add the downloadable file, or files, to that product.

As you can see, in the example above, the process is very similar to creating any other product. Once you click the Downloadable check box you’ll have fields specific to digital products. In these fields you can control: a) the files included in this digital product, b) the amount of times the consumer can download the product, and c) the number of days before the download link expires.

Further reading

Overall the process is the same as creating a basic product in WooCommerce with a few new options. If you’re familiar with building products in WooCommerce then creating your first digital product should be a breeze. If you’re trying to create something more advanced though you can always read the official WooCommerce docs on Digital/Downloadable Product Handling.