본문 바로가기

Error and Solve

git repo initial commit / git remote add origin

반응형

…or create a new repository on the command line

 

echo "# GITREPO" >> README.md

git init

git add README.md

git commit -m "first commit"

git branch -M main

git remote add origin https://github.com/user/gitreponame.git

git push -u origin main

echo "# GITREPO" >> README.md

git init

git add README.md

git commit -m "first commit"

git branch -M main

git remote add origin https://github.com/user/gitreponame.git

git push -u origin main

 

 

 

…or push an existing repository from the command line

git remote add origin https://github.com/user/gitreponame.git

git branch -M main

git push -u origin main

git remote add origin https://github.com/user/gitreponame.git

git branch -M main

git push -u origin main

반응형