Git First Time Setup

undefined or mostly null.
Search for a command to run...

undefined or mostly null.
No comments yet. Be the first to comment.
In this series, I will share articles related to creating, contributing to, maintaining, and sustaining open source projects.
Have you ever encountered Git asking you for your username and password every time you try to interact with GitHub even after configuring it? Well, this is a very common problem among users who use the HTTPS clone URL for their repository. In this ar...
I wrote this article in December 2023 for an interview screening task and thought to share it today while clearing my drafts for some new content prep, just in case it's still helpful to someone out t

Hey! I’m super excited to announce that I have joined the Secretariat Team at the Digital Public Goods Alliance. In this role, I leverage my passion for open source and technical background to assess DPG applications, provide technical support and ad...

Creative designs have become more important than ever in the software ecosystem today with many industries and end-consumers having several use cases that require them to offer design editing solutions to either designers or end-consumers. Every busi...

With the rise of artificial intelligence (AI) and large language models (LLMs), it has become easier to solve different human problems than ever before. Even consumers with little to no technical expertise can benefit from AI. Humans can now automate...

Some years ago, GitHub introduced the new Profile README feature that allowed GitHub users to pin a markdown file on their profile using a special repository named after their GitHub username. Since then, developers have used this file as a quick por...

Git is a Free and Open Source Distributed Version Control System.
By far, Git is the most widely used modern version control system in the world today. Git is a distributed and actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.
Unlike older centralized version control systems such as SVN and CVS, Git is distributed: every developer has the full history of their code repository locally. Git also works well on a wide range of operating systems and IDEs (Integrated Development Environments).
In this article, I'll show you how to install Git, set it up for the first time, and useful tips and resources to learn more/ learn advanced git concepts. Let's roll!
I assume you already know what Version control is, if you don't, kindly check out this slide to learn more.
Here's a quick recap of what Version control means:
Version control is the process of managing changes to source code or set of files over time.
Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can restore and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members or contributors.
Now that you know what Version Control and Git mean, let's install it.
Download Git for macOS or install using Homebrew
brew install git
Download Git for Linux or Install for Debian-based Linux systems
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
or Install for Red Hat-based Linux systems
sudo yum upgrade
sudo yum install git
Here's a more detailed installation guide for different systems on Git official docs
Now that you have Git on your system, let's set up the Git environment.
Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.
git config --global user.name "bolajiayodeji"
git config --global user.email mailtobolaji@gmail.com
the --global option makes sure these values are used throughout your system
git config --global core.editor emacs
For Linux OS users, you can use third pary Zsh configurators like oh my zsh to customize your terminal look with themes :). To configure this, do this:
git config --global color.ui true
The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.
Now Git is ready for use.
git config --list
user.name=bolajiayodeji
user.email=mailtobolaji@gmail.com
color.ui=true
Want to learn some super Git commands? I wrote an article: Git Cheat Sheet that covers some important Git commands you'll need.
You can also find more resources to learn Git here.
Version control software is an essential part of every day of modern-day software developers' practice. Once accustomed to the powerful benefits of version control systems, many developers wouldn’t consider working without it even for non-software projects.