본문 바로가기
utils/git and github

[Git] remote, remote add, remote show: 원격저장소와 연결

by ds31x 2024. 5. 26.

remote, remote add, remote show: 원격저장소와 연결

git remote add origin <remote_repository_url>: 원격저장소 연결

Local repository와 Remote repository를 연결.

  • Remote repository의 단축이름(별칭)을 보통 origin으로 지정.
  • 이후, Remote repository url 대신 단축이름(별칭, alias) 으로 처리 가능함.

다음 명령어로 local repository와 remote repository를 연결함.

git remote add origin <remote_repository_url>
  • 일반적으로 git remote add <단축이름> <remote_repository_url> 형태임.
  • git remote -v로 연결이 제대로 되었는지 확인.


git remote: remote_repository의 단축이름 확인.

현재 연결된 remote repository의 단축이름 을 보여줌.

  • -v 옵션을 줄 경우, 단축이름 과 url을 같이 보여줌.


git remote show <remote_repository_단축이름>: 저장소 정보 확인

현재 연결된 remote repository의 구체적인 정보를 보여줌.


같이 읽어보면 좋은 자료들

2024.05.20 - [utils/git and github] - [Git] Git Summary (작성중)

 

[Git] Git Summary (작성중)

git이란2024.05.20 - [utils/git and github] - Git : 소개 git 설치 후 해줘야 하는 작업들[Git] git 설치 후 우선 해줘야 하는 작업들 (tistory.com)local repository 초기화2024.05.20 - [utils/git and github] - [Git] init : local rep

ds31x.tistory.com

 


 

728x90

'utils > git and github' 카테고리의 다른 글

[Git] Tutorial: remote repository  (0) 2024.05.26
[Git] Remote Repository  (0) 2024.05.26
[Git] pull and fetch  (0) 2024.05.26
[Git] push  (0) 2024.05.26
[Git] Tutorial: 3-way merge, fast forward, and rebase  (0) 2024.05.26