git--version# Configure Gitgitconfig--globaluser.name"Name"gitconfig--globaluser.email"abc@xyz.com"# if we want to use separate name and mail; initiate a git and then setup new username and mail using the followinggitconfiguser.name"Name"gitconfiguser.email"abc@xyz.com"
Git Repository Setup
# Initialize Git in a directorygitinit# Checking current status of git. Displays the state of the working directory and the staging areagitstatus# Adding to the staging areagitadd<FILE>gitadd. (or) git add --all
Git Commit
# Final Commit from the staging areagitcommit-m"Added First Files"
Connecting to Github
# Github Login>NewRepository>CreateRepository# push an existing repository from the command linegitremoteaddorigin<.....>gitbranch-Mmaingitpush-uoriginmain
Github SSH Key Setup
ls-al~/.sshssh-keygen-trsa-b4096-C"navidfazlerabbi@iut-dhaka.edu"eval"$(ssh-agent-s)"# run ssh agent in the backgroundssh-add~/.ssh/id_rsa# adding id_rsa to the ssh-agentpbcopy<~/.ssh/id_rsa.pub# In GithubSettings>SSHandGPGKeys>NewSSHKey