Hello and welcome to my blog in this article we'll be talking about Git and Github. Have you ever come across the word Git or Github? if yes this article is an introduction of what the two technologies are and what they are used for. In this article, I'll be introducing you to what Git and Github are, their uses, and some basic git commands to get started with.
What is Git
Git is a version control software that helps you track different versions of your code. Basically what Git does is help us keep track of all changes made to our code by ourselves or other team members and git does that using version control. Git also allows us to do the following:
Keep track of all files in a project
Record any changes to project files
Restore previous versions of files
Compare and analyze code
Merge code from different computers and different team members.
What is version control?
Version control helps us track changes made to our project, Version control software keeps track of every modification to the code. If a mistake is made, developers can compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members. Git is an example of version control software.
What is Github
Github is a website that stores your code repository, it is a code hosting platform for version control and collaboration. it helps you and others work on projects from anywhere.
What is a repository?
A repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, and data sets – anything your project needs.
Types of a repository
Public - it can be accessed by anyone. open-source projects are usually in public repositories.
Private - A private repository can only be accessed by its owner and authorized users only.
Basic Git Commands
git status - This command list all files that have to be committed
git init - This command is used to initialize (start) a new repository.
git add - This command adds new or changed files in your working directory.
git commit - git commit creates a commit, which is like a snapshot of your repository.
git push - This command sends the committed changes to your remote repository
git clone - This command is used to obtain a repository from an existing URL
Conclusion
Git and Github are both essential technologies you will find very useful in your developer journey while collaborating with developers on open source projects or working with teams.
If you want to read more on Git and Github feel free to check out this article here
Thank you for reading you can always reach out to me on Twitter @alaboexcel.