set up origin git code example

Example 1: change remote url git

git remote set-url origin https://hostname/USERNAME/REPOSITORY.git

Example 2: git overwrite urlk

# Overwriting an existing git url:
git remote set-url origin <git_url>

Example 3: github remote

echo "# HarryFoods" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin < repo url >
git push -u origin main

Example 4: git connect to remote repository

git init
git commit -m "[message]"
git remote add origin "github repository link"
git push -u origin master