Git & GitHub Setup

Check Git Version

Verify if git is currently installed on the system.

Git

Generate SSH Key

Create a new ED25519 public key for GitHub authentication.

ssh-keygen -t ed25519 -C "user@gmail.com"

Start SSH Agent

Initialize the ssh-agent process in the background.

eval "$(ssh-agent -s)"

Add Private Key

Register your specific private key with the ssh-agent.

ssh-add ~/.ssh/id_ed25519

View Public Key

Display the public key content to copy for GitHub.

cat ~/.ssh/id_ed25519.pub

Test GitHub Connection

Verify that authentication with GitHub is successful.

ssh -T git@github.com

Project Workflow

Clone Repository

Download the My_Billing repository to your local machine.

git clone git@github.com:username/My_Billing.git

Open Project Directory

Navigate into the newly created project folder.

cd My_Billing/

Disable Push to Origin

Configure the origin remote to disable accidental pushing.

git remote set-url --push origin DISABLED

Verify Remote URLs

Check the list of remotes to confirm correct configuration.

git remote -v

Fetch & Status

Fetch latest updates, check status, and pull changes.

git fetch origin
git status
git pull --ff-only origin main