GitHub
What is GitHub?
GitHub, Inc. is a provider of Internet hosting for software development and
version control using Git. It offers the distributed version control and
source code management (SCM) functionality of Git, plus its own features.
It provides access control and several collaboration features such as bug
tracking, feature requests, task management, continuous integration and wikis
for every project.
It is commonly used to host open-source projects. As of January 2020, GitHub
reports having over 40 million users and more than 190 million repositories
(including at least 28 million public repositories). It is the largest source
code host as of April 2020.Info from Wikipedia
Why us GitHub So Popular
GitHub has various advantages but many people often have a doubt as to why not use dropbox or any cloud based system? Let me take the same example forward to answer this question. Say more than two software developers are working on the same file and they want to update it simultaneously. Unfortunately, the person who save the file first will get precedence over the others. While in Github, this is not the case. Github document the changes and reflect them in an organized manner to avoid any chaos between any of the files uploaded.
Therefore using GitHub centralized repository, it avoids all the confusion and working on the same code becomes very easy.
How to Use GitHub?
How to create a GitHub Repository?
A repository is a storage space where your project lives. It can be local to a folder on your computer, or it can be a storage space on GitHub or another online host. You can keep code files, text files, images or any kind of a file in a repository. You need a GitHub repository when you have done some changes and are ready to be uploaded.
This GitHub repository acts as your remote repository. So let me make your task easy, just follow these simple steps to create a GitHub repository:
- Go to the link: https://github.com/ . Fill the sign up form and click on “Sign up for Github”.
- Click on “Start a new project”.
- Enter any repository name and click on “Create Repository”. You can also give a description to your repository (optional).
Now, if you noticed by default a GitHub repository is public which means that anyone can view the contents of this repository whereas in a private repository, you can choose who can view the content. Also, private repository is a paid version. Also, if you refer the above screenshot, initialize the repository with a README file. This file contains the description of the file and once you check this box, this will be the first file inside your repository.
Congratulations, your repository is successfully created! It will look like the below screenshot:
Create Branches and Perform Operations
Branching: Branches help you to work on different versions of a repository at one time. Let’s say you want to add a new feature (which is in the development phase), and you are afraid at the same time whether to make changes to your main project or not. This is where git branching comes to rescue. Branches allow you to move back and forth between the different states/versions of a project.
To create a branch in GitHub, follow the below steps:
- Click on the dropdown “Branch: master”
- As soon as you click on the branch, you can find an existing branch or you can create a new one. In my case, I am creating a new branch with a name “readme- changes”. Refer to the below screenshot for better understanding.
- You can upload multiple files to GitHub at the same time.
- If a repository has any protected branches, you can't edit or upload files in the protected branch using GitHub. For more information, see "About protected branches."
- On GitHub, navigate to the main page of the repository.
- Above the list of files, using the Add file drop-down, click Upload files.
- Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
- At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message. For more information, see "Creating a commit with multiple co-authors."
- Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, see "Creating a new pull request."
Source:www.edureka.co/blog
Adding a file to a repository
Files that you add to a repository via a browser are limited to 25 MB per file. You can add larger files, up to 100 MB each, via the command line. For more information, see Adding a file to a repository using the command line
-
You can use GitHub Desktop to move your changes to a new branch and commit them. For more information, see "Committing and reviewing changes to your project."
Content Delivery Network
What is CDN?
A CDN (Content Delivery Network) is a network of servers that distributes content from an “origin” server throughout the world by caching content close to where each end user is accessing the internet via a web-enabled device. ... This process also decreases stress on origin servers by distributing the load geographically across multiple servers.Overall it boots web page speed.
Statically.io
Statically.io is the fast and easy way to make your websites load faster. This plugin allows you to easily host and optimize static assets with our fast, reliable global CDN.
Usage
https://cdn.statically.io/gh/:user/:repo/:branch/:fileOr Simply Use this Convertor
Jsdelivr
JSDelivr is a free public CDN for open-source projects. It can serve web files directly from the npm registry and GitHub repositories without any configuration. It is currently the second most popular public CDN that hosts multiple projects. On October 14, 2020, it became the official CDN of Bootstrap.
Usage
https://cdn.jsdelivr.net/gh/:user/:repo@:branch/:fileOr Simply Use this Convertor
Githack
Raw.githack.com serves raw files directly from various source code hosting services with proper Content-Type headers
Usage
Direct paste raw file url to get Link
Hope you Liked this Post 😃. If any Query , Comment Please