Novice Developer

GitHub 홈페이지에서 repository 처음 생성 시 GitHub가 알려주는 command

xojuholic 2022. 12. 26.
728x90
반응형

제목 그대로 GiHub 홈페이지에서 repository (private 또는 public) 생성한 후 해당 repository 클릭하면 GitHub에서 알려주는 3가지 방법이다.

…or create a new repository on the command line

echo "# <repository_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/<user_id>/<repository_name>.git
git push -u origin main

 

…or push an existing repository from the command line

git remote add origin https://github.com/<user_id>/<repository_name>.git
git branch -M main
git push -u origin main

 

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
[Import code ⇒ (button tag)]

 

물론, 착각할 사람은 없겠지만, 혹시 몰라서 언급하면

  • <user_id> : e.g., hongildong, hulk, and etc
  • <repository_name> : e.g., coding_is_so_difficult, wanna_be_a_developer, and so on

등이며 아래는 해당 페이지를 캡처한 이미지이다.

git command

 

728x90
반응형
SMALL

댓글

💲 추천 글