skip to content
Hafiz Farhad

Understanding Git and Github

/ 1 min read

Table of Contents

Setting up git on linux.

I am assuming you have ubuntu or any debian based distro installed on your PC.

Otherwise, you’ll probably need to install git using respective package-manager.

Install git

Terminal window
sudo apt update
sudo apt upgrade
Terminal window
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
Terminal window
git --version

Setup

Terminal window
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Terminal window
git config --global init.defaultBranch main
Terminal window
git config --get user.name
git config --get user.email
Terminal window
ls ~/.ssh/id_ed25519.pub
Terminal window
ssh-keygen -t ed25519
Terminal window
cat ~/.ssh/id_ed25519.pub

References