What you need to know about git and GitHub.
Git is a distributed version control system that is used to track code changes, track who made changes, and facilitate code collaboration.
Version control is a method for saving changes over time without overwriting previous versions, while distributed means that every developer has access to the entire project.
GitHub is a cloud-based platform that allows developers to host, share, and contribute code for software
How do I get it?
To get Git, you have to install it on your Windows / macOS / Linux from the official website,Git
After a successful installation, here are the next steps to follow.
Step 1
Check the version using the 'Git version' command.
git --version
This basically shows the installed git version.
Step 2-Getting to know each other.
gitconfig --global user.name"name"
You will be telling git who you are, what your contacts are, and how you will be recognizing each other, together with your GitHub details.
There are 3 parts that you will see on your command.
- Git config - This will set your git.
- --global- Applies to all repositories on your machine.
- user.email/user.name- This identifies your commit, while email/name identifies you on GitHub
gitconfig --global user.name"name"
gitconfig --global user.email"email"
Step 3- Confirmation
Make sure your name and email have been configured using this prompt.
git config --global --list
Step 4- Connecting Git to GitHub
We do this by using something called an SSH Key. So what exactly is that? Good question. This is a secure digital identity that will allow your computer to establish the validity of who you are. Why is this important? This helps you avoid having to input your passwords every time you want to access your GitHub on your gitbash.
This is the prompt that will generate both the public key and the private key.
Make sure you use the email that you used to create your GitHub account.
Key- Specifies that we are generating a digital
ssh-keygen -t ed25519 -C"email"
Step 5 - The connect
Once in possession of the keys, you will need to get a key holder, which, in tech terms, means getting an agent who will hold them and also assist you in linking with GitHub.
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
Go to your GitHub account, on the settings menu, click SSH and GPG keys. Click "New SSH key", paste your key, and give it a descriptive name that you will recall.
More functions
Here are some basic functions that git performs
Git push is a function that allows developers working on a project to make changes on local machines and send(push) to web platforms like GitHub, and also receive (pull)
Git pushGit pull.Git init is a function that is used to initialize new repositories.
-Git status is a function that allows developers to show any changes as untracked, modified, or staged in files in the directory.
Git status
-Git commit is a function that saves a snapshot of the project history and completes the change tracking process or validates changes made.
Git commit
-Git add is a function that is used to add a file to an index.
Git add
Fast and effective, designed with security in mind, it just makes sense why Git is the go-to tool for great all-around work flexibility for both individual and team projects, with a huge support and dedicated community to resolve and improve issues due to its open source nature.
It can get overwhelming coming from a non-tech background, but with enough reps its an exciting endeavour.

Top comments (0)