Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

create a new repository on command line github

## Create a new repository on the command line
echo "# REPOSITORYNAME" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/USERNAME/REPOSITORYNAME.git
git push -u origin main
## or Push an existing repository from the command line
git remote add origin https://github.com/USERNAME/REPOSITORYNAME.git
git branch -M main
git push -u origin main
Source by github.com #
 
PREVIOUS NEXT
Tagged: #create #repository #command #line #github
ADD COMMENT
Topic
Name
7+9 =