Push : Local -> Remote

# git push origin HEAD:refs/for/branch


통상 위와 같은 명령어로 수정된 commit을 push 한다. (gerrit을 사용하는 경우)

명령어를 하나하나 뜯어보자


 명령어

 의미 

 git

 

 push

 

 origin

  리모트 저장소의 URL을 의미함

  # git remote -v 

        origin https://git.ourcompany.com/your-project.git (fetch)

        origin https://git.ourcompany.com/your-project.git (push)


  ref. https://code.i-harness.com/ko-kr/q/506ce8

  ref. https://stackoverflow.com/questions/8190392/is-there-a-git-command-that-returns-the-current-project-name

 HEAD

   Commit 한 내용

 :refs/for/branch

   Push할 remote branch

   refs : reference spec(refSpec)

   gerrit을 사용할 때 remote branch에 push 하기 위한 spec 인 것이다.




ref. https://mytory.net/archives/12632



'20. Programming > Tools - GIT' 카테고리의 다른 글

GIT 기본적 명령어 (수정되돌리기 추가)  (0) 2018.10.30
GIT - Change-Id 자동으로 넣기  (0) 2018.05.18
GIT - commit message  (0) 2018.05.18
GIT 기본 파일들  (0) 2018.05.18

+ Recent posts