Git is one of the important tools for anyone who is into the development of cyber security, data science, machine learning engineering, or any other activity that requires open source interaction collaboration, and other stuff In the beginning it might sound something complex but as you proceed through different sections, you get an exact picture about using and working with Git.
On the other hand, GitHub (recently owned by Microsoft) is built around Git as the
base technology. We will first explore Git and its concept and move forward
with GitHub and at last if you are a student, GitHub Student Developer Pack
(something you must look at and avail).
Hey, friends, this is a more exciting topic on Ethical Hacking and Penetration testing that is Git Hub. Everybody already knows about it or, maybe not. If you don’t know, you don’t have to worry, this video is absolutely for beginners and also for the advanced level.
Let’s overview our topic, and what we cover in this video.- Introduction to Git and why it came into existence?
- The various States of Git.
- Install Git
- Creating Git Repository & Other Commands
- GitHub & GitHub Students Developer Pack
Git: Introduction, and it’s the existence
We all know “Necessity is the mother of all inventions”.
Similarly, Git was also invented to fulfill certain necessities that the
developers faced before Git. So, let us take a step back to learn all about Version
Control Systems (VCS) and how Git came into existence.
When you are working on a simple project, such as a single-page HTML, it is fairly easy to remember the last thing you changed and where
the development is headed. But tracking revisions over time, also referred to
as version control quickly becomes more complex when you are working on a
large project with multiple files and multiple developers.
You not only want to record changes, but also who made the
changes, and when. Managing revisions at this level requires a Version Control
System.
Version Control Systems (VCS) help The software team manage changes to source code over time.
VERSION CONTROL SYSTEM software includes tools for saving
the state of a project, viewing the history of changes, and reverting changes.
Developing software without using version control is risky, similar to not
having backups.
VERSION CONTROL SYSTEM can also enhance and speed up
development. Depending on the version control software used, many developers
can work on the same code at the same time.
For example, one developer on the team may be working on a
new feature while another developer fixes an unrelated bug, each developer making changes in several parts of the codebase.
VERSION CONTROL SYSTEM even has tools to prevent conflicts
when one developer's changes are incompatible with changes made at the same
time by another developer.
Git has another advantage - it is distributed. Rather than
having only one single place for the full version history of a project, every developer's working copy of the code is also a repository that can contain a full history of all changes.
Git was created by Linus Torvalds in 2005 for the development of
the Linux kernel, with other kernel developers contributing to its initial
development.
The Three States
The Three States is an important concept to remember about git. The data information used along with git contains mainly Three States for git, that is:
- Committed
- Modified
- Staged
Committed. - It represents that after
performing a particular task, the work has been updated and successfully stored
in the local database (local filesystem). It just acts like saving a document.
Modified. - When you are working on the
data, and after performing a particular task, there is a modification in the data
and you haven't committed changes yet, this is a modified state.
Staged. - It is a little
non-conventional to understand, according to git, it means that you have marked
a modified file in its current version to go to the next commit snapshot. In simple
words, you add the file with modification(s) for commit in this state.
The simple workflow of git is, that you create a space
in your local environment (working tree) and start playing around. After certain changes or further development, the modified files in the working tree are sent for the staging state and
finally committed after the review, and the latest snapshot of the changes is made permanent
to the Git Directory you are working on.
Installing Git
For
installing git, we need to either clone or download the source file/ executables,
and the installation process varies depending upon the various operating
system(s), in this book, we will refer to the Installation process for Windows
& Linux-based systems. An additional link is provided for the Mac OS and Source code installation
Installing on Windows
1. Download Git for Windows (https://git-scm.com/download/win).
2.
Open the Installer and follow the steps.
3. Click on Next > Next (select components window) > choose editor and click Next (if you are confused keep default) > select path environment (Git from the command line and also from 3rd party software) and click Next > Use the OpenSSL Library, hit Next > Next > Next > Install > Finish.
Installing on Linux
For Debian distributions such as Kali Ubuntu or Parrot.
kali@mrdev:~$ sudo apt install git-all
For Fedora or any other RPM-based distributions such as RHEL or CentOS
cent@mrdev:~$ sudo dnf install git-all
GitHub
What is the difference between Git and GitHub?
GitHub is one of the popular widely used and largest host for the git repositories Millions of developers are actively using GitHub for project collaboration, and many big organizations are also utilizing GitHub for their most open source projects. According to the GitHub website, it provides features like Code Review Project Management. Integrations, Team Management Social Coding. Documentation & Code Hosting For more information - (www.github.com)
GitHub Student Developer Pack
(https://education.github.com/pack)
GitHub
Student Developer Pack is for students who are enrolled in a valid
full-time course in any university or school for their studies Visit the link mentioned
below section heading and get your pack by submitting basic details.
It
will require you to fill out a basic form asking a few questions like how you
will use this pack and so. Don't forget to use your academic email ID & upload your valid ID Card. (both issued by your
current academic institution).
It has a wide variety of tools and other learning resources that are premium, but you will get all of them for free, and it's cool to explore all the resources.