Gerrit: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:


$ scp -p -P 29418 pchero@review.example.com:hooks/commit-msg .git/hooks/
$ scp -p -P 29418 pchero@review.example.com:hooks/commit-msg .git/hooks/
</pre>
== Commit ==
<pre>
$ git commit --amend
</pre>
</pre>



Revision as of 10:22, 16 December 2015

Overview

git 연동 소스 리뷰 프로그램.

Basic

git 을 형상 관리 시스템이라고 한다면, gerrit 품질 관리 시스템이라고 할 수 있다. git 으로 소스를 업로드하고, gerrit 을 이용하여 소스 리뷰를 하여 소스의 품질을 향상시키는 방식이다.

$ curl -Lo .git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg

or

$ scp -p -P 29418 pchero@review.example.com:hooks/commit-msg .git/hooks/

Commit

$ git commit --amend

Push

Gerrit 에서의 Push 일반적인 git push 와는 다르다. 보통은 다음의 문법대로 push 한다.

$ git push origin HEAD:refs/for/<branch>

Revert

Gerrit 에서는 이미 커밋된 소스 내용들에 대해 수정하기는 조금 까다롭다. 커밋된 내용으로 checkout 후에, 소스를 수정하고, 다시 Push 를 해야 한다.

- git checkout <committed ref>
- <Fix the code>
- git push origin HEAD:refs/for/<branch>

See also