how to create a github repo from command line code example

Example 1: add github repo

create a new repository on the command line
echo "# {Repo Name}" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/cdcdianne/ReactJS-TheMovieDB.git
git push -u origin main
                
push an existing repository from the command line
git remote add origin https://github.com/cdcdianne/ReactJS-TheMovieDB.git
git branch -M main
git push -u origin main

Example 2: create repository in github using command line

git init
git add somefile
git commit -m "initial commit"
git remote add origin https://github.com/username/new_repo
git push -u origin master 

# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
# Create remote repository (likely on github), then:
git remote add origin https://github.com/username/new_repo #https
git remote add origin git@github.com:username/new_repo #ssh
# Now push
git push -u origin master

Example 3: how to create new repository in github

git init
• git add .
 git commit -m "first commit"
• git remote add
            origin https://github.com/sd1511/FinraDeck.git
• git push -u origin master

Example 4: how to create a github repo on linux command line

curl -i -H 'Authorization: token <your_token>' -d '{"name":"csreNewProj"}' https://api.github.com/user/repos

Example 5: github create repository command line

git **create -d "\<commit name\>"**

Example 6: how to add a repository to github

git & github