Learn Git and Github
0x0 : Hello World
The Hello World project is a time-honored tradition in computer programming. It is a simple exercise that gets you started when learning something new. Let’s get started with GitHub!
On this lesson you’ll learn how to:
- Create and use a repository.
But before doing that, let’s first learn more about Github and Git and how they are marking the world a better place.
x00 What is Git and Github ?
x01 : What is Git ?
Git is a free, open-source version control software. This basically means that it is a content tracker.
Real life projects generally have multiple developers working in parallel. So they need a Version Control System like Git to make sure that there are no code conflicts between them.
So a Version Control System allows developers to revert and go back to an older version, check modifications, follow them and keep the whole work organised between a full team of coworkers or “Code-friends”.
And to do that, they use The Branching System in Git that allows developers to work individually on a task (For example: One branch -> One task OR One branch -> One developer). Basically think of Git as a small software application that controls your code base, if you’re a developer.
x02 : What are Git repositories ?
A repository (or “Repo” for short) is a project that contains multiple files. In our case a repository will contain code-based files.
So, if we want to start using Git and its amazing “Branching and Version Controlling” Systems, we need to know where to host our repositories.
There are two ways you can host your repositories. One is online (on the cloud) and the second is offline (self-installed on your server).
And here we can jump to our x03 and talk about Github.
x03 : What is Github ?
GitHub is a code hosting platform for version control and collaboration.
As I said on x02, we will need somewhere to host our Code, and Github is our solution now!
But, Why Github and not any other hosting solutions ?
-
It makes it easy to contribute to your open source projects
To be honest, nearly every open-source project uses GitHub to manage their project.
-
Documentation :
By using GitHub, you make it easier to get excellent documentation. Their help section and guides have articles for nearly any topic related to git that you can think of.
-
Showcase your work :
Are you a developer and wishes to attract recruiters? GitHub is the best tool you can rely on for this. Today, when searching for new recruits for their project, most companies look into the GitHub profiles.
-
Markdown :
Well! that's what I'm using right now to write this. Markdown allows you to use a simple text editor to write formatted documents. GitHub has revolutionized writing by channeling everything through Markdown
Here you can find all the features Github can offer if you want to know more : Github Features
x10 : Making your first Git repository
x11 : Creating a Github Account :
I mean, you are already here! it is a probability of 1% if you don’t already have an account.
If not, follow this link to Join GitHub : Join GitHub
x12 : Logging in and seeing Github’s interface for the first time
After Logging in, you will face an interface similar to this one, And this will be your Github’s Dashboard. ( I don’t think it will be as full as mine but that is what I hope for all Algerians ♥️)
x13 : Installing Git on your machine :
Installing Git deffers from an Operation System to another, So follow this detailed tutorial with images to do that. Installing Git on Windows,OSX and Linux
x14 : Configuring Git
After installing git, now you have to configure the name and the email that you’ll use for your next contributions and modifications. To do that, open the terminal OR Git CMD (For Windows Users), and type :
git config --global user.name "YOUR NAME"
git config --global user.email "YOUREMAIL@MAIL.COM"
x14 : Creating a repository :
To do that,
- 1 - Go back to you Github Dashboard.
- 2 - Create a new repository
- 3 - Name your repository hello-world.
- 4 - Add the following Description
#LearningWithDzCode
- 5 - Make the repository Public, Add a Readme file and create it.
- 6 - CONGRATULATIONS ! You just created your first Git repository ♥️
On the next chapter, You will learn how Git works and its The Three State Model
.
© 2020 - DzCode - Sofiane Hamlaooui - Making the world a better place 🌎