git add remote branch code example
Example 1: delete remote git branch
git push --delete remoteName branchName
Example 2: create local and remote branch
git checkout -b yourBranchName
git push -u origin yourBanchName
Example 3: git new branch push to remote
git push -u origin <branch>
Example 4: 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 5: git add remote
git remote add heroku https://git.heroku.com/arrecs.git
git remote -v
-> heroku https://git.heroku.com/arrecs.git (fetch)
-> heroku https://git.heroku.com/arrecs.git (push)
git remote remove heroku
git remote -v
Example 6: add remote branch git
git remote add github git://github.com/jdoe/coolapp.git
git fetch github