TOOL/VCS 2019. 12. 23. 11:21

Git (깃)

Git은 기본으로 origin이라는 remote를 갖게 될 것이다. 그리고 origin을 따로 명시하지 않아도 기본으로 origin이라고 이름붙여진 Remote Repository(원격저장소)와 연결될 것이다.

git pull
git push

하지만 다음과 같은 상황에서는 Remote를 추가해 두어야 할 상황이 생길 것이다!

  • 현재 사용하고 있는 Remote Repository의 주소(IP)가 상황에 따라 변한다.
  • 다른 Remote Repository와 동기화하며 사용한다.

1. Remote 추가

  • 등록 (예: http://133.81.11.54/something/project_name.gitext라는 별도의 이름을 지어서 관리하자)

      git remote add ext http://133.81.11.54/something/project_name.git
  • 확인

      git remote 
      git remote get-url ext

2. Git 작업하기

  1. 예) develop Branch에서 작업시

    • pull

        git pull ext develop
    • push

        git push ext develop

3. Issue

내 주변에서 많이 겪는 이슈가 있어서 별첨한다.

  1. 오류

     remote: HTTP Basic: Access denied 
     fatal: Authentication failed for ...
  2. 해결!
    https://forgiveall.tistory.com/540