Git and Git-hub, a very vital tool in a developers life

in #web3 years ago

images (3).png

Hello Guys

Honestly, becoming a web dev is a journey that requires the mental ability and physical ability too. It needs patience and dedication.

Git and Github is a very vital tool that every developer got to know in this ecosystem, but i have been finding it very difficult to understand the concept in these two.

So many developers confuse git with github, now let me make it easy for then with these illustrations and few explanations.

The first question is: What is Git?, and what is Github?

images (2).png

**A Git **
GIT is a version control system for tracking chanfes in computer files. It is generally used for source code management in software development. I dont know if u got the perfect understanding of what git is..(any question should be directed to the comment section).

Features of Git:

  1. A GIT tracks history
  2. A Git is totally free and open source
  3. Support Non-Linear Development
  4. Create Breakup
    5.Scalable
  5. Supports Collaboration
    7.Branching is easier
  6. Distributed Development.

While

GitHub-Logo.png

A Git-hub is just a website where our repositories (files) are stored and kept for easy access.

I will show you how to push a file to git hub through git

images (33).jpeg

There are so many commands for in git but i will show you the ones to use when pushing a repo.

  1. Git is a version control system
  2. Github a website
  3. Git is used to put work or project into git hub

Using git:

  • download and open git bash in your PC
  • go into desktop by typing ' cd Desktop '.
  • create folder called anything . I.e mkdir anything
  • go into the repo (folder) ime cd anything
  • initialize git in the folder i.e git init
    -go off from git and locate this repo in your desktop, open it and add a file if it doesnt have any.
    -go back to git and check it the file is addede i.e git status
  • you will dee the file and then add it to git. I.e git add ' name of file '.
  • the commit the file i.e git commit -m ' the comment '.
  • add a user name and email after commiting i.e git config --global user.name and git config --global user.email.

After doing this, go back to your github, cteate the repo and copy the repo link

Come back to the git, and specify where you want the files of the repo in git to go to.

I.e git remote add origin, then paste the git repo link

Then u push.. i.e git push Origin master..

Is a bit confusing but i urge u to read more so you get the perfect understanding.

Thanks
@infovore
@davidad