????Redmine ???? Wiki ???????????????????????????? Best Practice ??????????? Redmine ?????? Git ?汾?? ??????? ?????????????????Щ???????????????????
????· ??????? Clone ?汾??
????· ??????? ???? Redmine
????· ?????????????°汾??
????· ????????????汾????
????· ??? redmine ?????????? redmine ??
????· ????????? /srv/redemine ????????????? /srv/redmine/repos ??
????git ???????? ssh://redmine@git.mysite.com:29418/a.git ?? ssh://redmine@git.mysite.com:29418/b.git ??????????? Gerrit????
????Redmine ???????????????汾???? Clone ????汾?????????е??????д?? Redmine ????????С?
??????????? Clone ?汾??
??????????? MIRROR ???? Clone ?????汾??Mirror ????汾??????????????????????????????????????????? Clone ????????С?????????
????sudo -su redmine
????cd /srv/redmine/repos/
????git clone --mirror ssh://redmine@git.mysite.com:29418/a.git
????git clone --mirror ssh://redmine@git.mysite.com:29418/b.git
??????????????? Redmine ?????e汾???·????
??????????? ???? Redmine
???????? “administration > project -> repositories” ???濪??汾???????????? “project -> settings -> repositories” ????汾???????
????· Type: GIT
????· Main-repository: ????????汾?????汾????????????
????· Name: ???????ú?汾????????????
????· Path: ?汾????????????·???? /srv/redmine/repos/a.git
?????汾??????????????????????????汾????? b.git ?????????汾????????????????????????ó??????汾???????Ч?????μ????????
?????????????????????汾???????????汾?????????????汾?????
??????????汾???г??????????????????δ??汾????????????????????? Redmine ???汾???е??????д???????????ò???????檔
????????????????????????????????£? Attaching an existing repository to a project ??
?????????????????°汾??
????Redmine ?????????????°汾???????????? GitHook ?????????°汾???????????? Crontab ??????
?????????????趨??? 5 ???????????????Ρ?
????sudo crontab -e -u redmine
????# ?????????? redmine ????£?????????
????crontab -e
????# ?????????????????????????д???????????
????*/5 * * * * git -C /srv/redmine/repos/a fetch --all
????*/5 * * * * git -C /srv/redmine/repos/b fetch --all
????????????????汾????
????Redmine ????????????????????????????? master ????????????????? git flow ?????? ??????????????????????? develop ??
?????????????????????? --mirror ???? clone ?????У???????? git checkout develop ???л??????????
???????????????????????????л????????
????git symbolic-ref HEAD refs/heads/develop
????symbolic-ref ?????????????? git-symbolic-ref ??
???????????????????? /srv/redmine/repos/a.git/HEAD ????????????????Ч????
????????????и???????
??????????????н??汾??? Referencing keywords ??????? issue???? Fixing keywords ?????????? fix ??
?????????????????????????????????1??2??????????3??? ???? ????
??????????? issue #1?? #2 ?? fix #3
??????????? issue:#1?? #2 ?? fix:#3
??????????? issue: #1?? #2 ?? fix: #3