Complete Guide to Git and Github. Learn about what is git and github, git installation on windows, create repository, git cheatsheet, upload project to git and more
Introduction - Guide to GIT
What is GIT?
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is a popular version control system. It was created by Linus Torvalds in 2005 and has been maintained by Junio Hamano since then.
It is used for:
- Tracing code changes
- Tracking who made changes
- Coding collaboration
What does GIT do?
- Manage projects with Repositories
- Clone a project to work on a local copy
- Control and track changes with Staging and Commiting
- Branch and Merge to allow for work on different parts and versions of a project
- Pull the latest version of the project to a local copy
- Push local updates to the main project
Working with GIT
- Initialize Git on a folder, making it a Repository
- Git now creates a hidden folder to keep track of changes in that folder
- When a file is changed, added or deleted, it is considered modified
- You select the modified files you want to Stage
- The Staged files are committed, which prompts Git to store a permanent snapshot of the files
- Git allows you to see the full history of every commit
- You can revert to any previous commit
- Git does not store a separate copy of every file in every commit but keeps track of changes made in each commit
Why GIT?
- Over 70% of developers use Git !
- Developers can work together from anywhere in the world
- Developers can see the full history of the project
- Developers can revert to earlier versions of a project
What is GitHub ?
Git is not the same as GitHub. GitHub makes tools that use Git. GitHub is the largest host of source in the world, and has been owned by Microsoft since 2018. In this blog, we will focus on using Git with GitHub. This is a beginner friendly guide to git and GitHub, so you will learn everything like introduction on git and git hub, git installation on windows, creation of repositories, cheat sheet for running Git commands and more.
Git Installation
How to install GIT ?
You can download Git for free from the following website : https://git-scm.com
Using Git with Command Line
For Windows, you can use Git Bash, which comes included in Git for Windows. For Mac and Linux users, you can use the built-in-terminal.
To check if the GIT is successfully installed or not. Use the following command :
git --version
It should see the version of the GIT you installed.
Configure GIT
Now let Git know who you are. This is important for version control systems, as each Git commit uses this information:
git config --global user.name "the-info-docx"
git configure --global user.email "theinfodocx@gmail.com"
Change the username and e-mail address to your own. You will probably also want to use this when registering to GitHub later on.
Initialize GIT
Once you have navigated to the correct folder, you can initialize Git on that folder.
git init
Congratulation ! You just created your first Git Repository !
Create a Repository on GitHub
If you don't have any GitHub account then just go to the website https://github.com/ and signup yourself.
After sign in you should see this kind of page.
You can create your own repository by clicking the new button.
After clicking the new button you should see this page on your screen.
After creating the repository you will be redirected to this page. Now, open your git bash or cmd an your project folder and execute each and every command one by one.
Cheatsheet
Conclusion
So, in this way you have finally completed the Complete Beginner Friendly Guide to Git and GitHub. Now you will be able to make basic use of Git and GitHub and can dive into other features of GitHub. You have finally gained knowledge about introduction on Git and GitHub, git installation on windows, mac and Linux, creation of repositories, cheat sheet for running Git commands and more.
To get more tips, ticks and guides on Coding follow The Info Docx.
REFERENCE- Poor Coders
Also Read:
TAGS- guide to git, guide to github, github guide, beginners guide to git, git tutorial, github tutorial, git tutorial for beginners, git tutorial beginner, git tutorial interactive, git tutorial rebase, git tutorial pdf, git tutorial branch, git tutorial atlassian, git tutorial basics, git tutorial eclipse, git tutorial github, git tutorial youtube, git tutorial command line, git github, git vs github, git for github, git with github, git on github, git installation, git installation on windows, install git ubuntu, git installation in linux, git installation on linux, git installation linux, git install npm
Tags:
beginner guide to git
complete beginner friendly guide to git and github
git tutorial
github guide
guide
guide to git
installation of git on windows
learn git and github beginner
what is git