Push code to a new GitHub repository

Andres Sandoval
1 min readDec 17, 2021

How to push your local code to a new GitHub repository:

  1. Create a repository on GitHub.
  2. When you create a new repository you will get the below steps in your screen, with the correct repository name. (below is my repository name).
echo "# AndroidComposeAdMobSDK" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:AndreSand/AndroidComposeAdMobSDK.git
git push -u origin main

--

--