Chapter 2. Git & GitHub Initial Settings

For programming beginners, the first hurdle to using Git and GitHub may be setting up the environment properly. The setup process differs based on the operating system (Mac, Windows, and Linux). In this chapter, we'll guide you through the necessary steps to configure Git and GitHub on different platforms with practical examples.
What We Cover in This Chapter
The following topics are covered in this chapter:
Git & GitHub Initial Settings Overview
In this section, we'll provide an overview of the key steps required to set up Git and GitHub. We'll explain the required tools and software and discuss different installation approaches.
Key Tool Preparation (1) – Mac
If you're using macOS, Git may already be preinstalled on your system. In this section, we'll cover how to check your Git installation, install it if necessary, and configure essential tools like Visual Studio Code and the macOS Terminal.
Key Tool Preparation (2) – Windows
Setting up Git on Windows requires additional steps. In this section, we'll walk through installing Git for Windows, setting up Git Bash as the command line interface, and configuring VS Code for seamless Git integration.
Key Tool Preparation (3) – Linux Remote Server
For those working on remote Linux servers, Git setup involves additional configurations. We'll cover how to install Git on Linux, manage remote connections, and configure Git for effective collaboration on a remote server.
Git User Settings – git config
In this section, we’ll explore how to configure your Git identity using git config
. You'll learn how to set up your username and email address, choose a default text editor, and verify or modify your settings.
Create GitHub Account
To use GitHub, you need to create an account. In this section, we'll guide you through the sign-up process, explain the available account plans, and show how to customize your user profile.
GitHub Access Authentication Settings
GitHub requires authentication for secure access. We'll cover different authentication methods, including HTTPS (using a Personal Access Token) and SSH (using key pairs). Understanding these methods is crucial for secure GitHub interactions.
Generating PAT (Personal Access Token)
Personal Access Tokens (PATs) are required for HTTPS-based authentication with GitHub. In this section, we’ll walk through generating a PAT, setting appropriate permissions, and using it to authenticate Git commands securely.
GitHub SSH Setup
SSH authentication provides a secure and convenient way to interact with GitHub without repeatedly entering credentials. We'll explain how to generate SSH key pairs, upload the public key to GitHub, and test SSH connections.
Learn offline for better focus!
A book for this course is available on Amazon.
Git & GitHub Visual Guide
The Hands-On Manual for Complete Beginners to Master Version Control and Remote Coding Collaboration
Get the Book Now