In today's video we cover How to Install and Configure Git and GitHub on Ubuntu (Linux)
All commands used in this tutorial, ready to copy and paste.
Introduction and Installing Git
sudo apt-get update -y
sudo apt-get install git -y
Verifying the Git Installation
git --version
which git
Configuring Your Git Identity
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global --list
Setting Up Additional Git Defaults
git config --global init.defaultBranch main
git config --global color.ui auto
cat ~/.gitconfig
Generating an SSH Key for GitHub
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/id_ed25519 -N ""
ls -la ~/.ssh/
Copying Your SSH Public Key for GitHub
cat ~/.ssh/id_ed25519.pub
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Initializing Your First Git Repository
mkdir -p ~/my-first-repo && cd ~/my-first-repo
git init
echo "# My First Repo" README.md
git add README.md
git commit -m "Initial commit"
Connecting to a Remote GitHub Repository
git remote add origin [email protected]:yourusername/my-first-repo.git
git remote -v
git branch -M main
==================================================
Found this useful? Like & Subscribe for more Linux tutorials.
how to push to github from terminal ubuntu, how to install git, complete git and github beginner to expert, commit and push code to github using git bash, how to install node js and npm in visual studio code, how to use git bash to push to github, git and github complete tutorial, how to use github with visual studio code, what is git and how to use it, git and github tutorial, complete git and github, complete git and github course, git and github tutorial for beginners, how to use github in vscode