Open In App

Introduction to Github

Nowadays software development takes place in a distributive way. This article focuses on one such technology that supports distributed software development i.e., GIT and it’s application via GitHub.

What Is Version Control?

A system called version control, sometimes referred to as source control or revision control, keeps track of changes made to a file or group of files over time so that you may retrieve particular versions at a later time. Although it can be applied to any circumstance where several versions of something are made and may need to be monitored and recalled, it is most frequently employed in software development.



What GIT?  

What Is GitHub?

GitHub is an web based platform which hosts software development projects and uses Git for version management. Git is a distributed version control system that helps developers to work together on same software projects and keep track of changes made to their code by on another. GitHub offers a user-friendly interface, which is very collaborative tools, and more project management tools, GitHub will enhance the potential of the Git.

GitHub allows developers to create and manage the code in the repository in the remote location where others can aceses the code or Github is an collection repositories which contains the files of the project.



What is Use Of Version Control Software?

What Are the Uses Cases Of GitHub?

Following are some of the use cases of GitHub

What Are Characteristics of Git?

A. Strong support for non-linear development 

B. Distributed development 

C. Compatibility with existing systems/protocol 

D. Efficient handling of large projects 

E. Data Assurance 

F. Automatic Garbage Collection 

G. Periodic explicit object packing

How does GIT work?

  1. A Git repository is a key-value object store where all objects are indexed by their SHA-1 hash value.
  2. All commits, files, tags, and filesystem tree nodes are different types of objects living in this repository.
  3. A Git repository is a large hash table with no provision made for hash collisions.
  4. Git specifically works by taking “snapshots” of files

Exploring The GitHub Interface

Github is an online platform where we can share our codes(or projects) online hassle-free. Github is place where we host our local git repository online. it basically allow you to work collaboratively within a group of peoples. It hosts all the features of Git and have its own too. 

In simple words, Github might be considered as a social media which is made for the developers where they share their work. it might be any project regarding website development or any design of website, or some operating systems like Android, or Linux, etc. 

Github is owned by Microsoft, provides access to public(free) and private(paid) repositories. It allows free repository to host files up to 100mb and total size for 2GB.

Let’s us see how to host to a local repository to Github, from very beginning(creating a github account).

A. Creating a GitHub Account

Step 1: Go to github.com and enter the required user credentials asked on the site and then click on the SignUp for GitHub button.

How To Get Started With GitHub

Step 1: Choose a plan that best suits you. The following plans are available as shown in below media as depicted: 

Step 2: Then Click on Finish Sign Up. The account has been created. The user is automatically redirected to your Dashboard. 

B. Creating a new Repository 

C. Start by giving a repository name, description(optional) and select the visibility and accessibility mode for the repository 

D. Click on Create repository 

E. The repository (in this case ITE-304 is the repository) is now created. The repository can be created looks like:

How To Upload Existing Repository to GitHub 

git init 

git add .
#Adds the files in the local repository and stages them for commit. To unstage a file, use
git reset HEAD YOUR_FILE

Commit the files that you’ve staged in your local repository.

git commit -m 'First commit'
# Commits the tracked changes and prepares them to be pushed to a remote repository.
To remove this commit and modify the file, use
git reset --soft HEAD~1
And commit and add the file again.

At the top of the GitHub repository’s Quick Setup page, click on the icon shown and copy the remote repository URL. 

In the Command prompt, add the URL for the remote repository where your local repository will be pushed.

git remote add origin remote repository URL



 # Connects to the remote repository 
git remote -v
# Verifies the new remote URL



Push the changes in your local repository to GitHub.

git push origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin.



And here you go…  

You may download changes from remote repository to local repository using the command:

git pull

Difference Between Git And GitHub

Git

GitHub

Git is an distributed version control system (DVCS).

GitHub is an web-based platform which helps git to host its repositories.

Git will track the changes in the projects that are made by the developers.

Github will helps you to tack the issue, pull request, code review and so on.

Git works on command line(CLI).

GitHub is an web-based graphical interface.

Git works in the local machine of developers by which you can commit changes, create branches, merge code.

GitHub is an remote hosting service by which other developers can accessible can pull and fetch the code according to there need.

Git Commands  

Companies and Projects Using GIT  

Frequently Asked Question (FAQs) What is GitHub?

1. What is GitHub Copilot?

GitHub collaborated with the open AI and developed a tool called as an GitHub Copilot which is an artificial intelligence (AI) tool it will helps the coders by artificial intelligence (AI) tool.

2. What is GitHub Repository?

GitHUb repository is an repo where all the files of an project will be stored and entire history of the code will also be maintained.

3. What is GitHub Desktop?

GitHub Desktop Provides useres Graphical User Interface(GUI) where they can work with the git repositories which is will make it easy to use the git. Which reduces the efforts of users of memorozing the commands used in the git.

4. What is GitHUb Actions?

GitHub Actions is a CI/CD (Continuous Integration/ Continuous Deployment) platform for automating the builds, test, and deployment process.


Article Tags :
Git