2 min read

Understanding Git and Github

Setting up git on linux.

I am assuming you have an ubuntu or any debian based linux distribution installed on your system/PC.

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

Install git

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

Setup

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

Copy this key and paste it in github ssh section.

Now you will be able to git clone using ssh

References