Install and Config: GIt
sudo yum -y install git git config --global user.name admin git config --global user.email [email protected] git config --global color.diff auto git config --global color.status auto git config --global color.branch auto git config --global core.excludesfile ~/.gitignore git config --global core.shared true git config -l
Create a shared repository
ãµã¼ãå´
adminã¦ã¼ã¶ããªã¼ãã¼ã«ãã
sudo mkdir /var/lib/git sudo chown -R admin.admin /var/lib/git cd /var/lib/git mkdir demo.git git init --bare --shared demo.git
ã°ã«ã¼ãã§ä½¿ãå ´å
ã°ã«ã¼ããä½æï¼ä¾ï¼hogegroupï¼
groupadd hogegroup
注æï¼ãusermode -G hogegroup usernameãã¨ãããã¨他のサブグループが消えてしまったりするのでã
/etc/group ã«è¿½å
- /etc/group
: hogegroup:x:0000:username :
ææã°ã«ã¼ãã¨ãã¼ããã·ã§ã³ãå¤æ´
chgrp -R hogegroup /var/lib/git chmod g+w -R /var/lib/git
Create a local repository
PCå´
cd ~/projects/demo git init
é©å½ã«ãã¡ã¤ã«ä½æãã¦ã³ããã
echo 'hoge' > hoge.txt git commit -m "first commit"
push and remote
git push ssh://USERNAME@HOSTNAME/var/lib/git/demo.git master git remote add origin ssh://USERNAME@HOSTNAME:PORTNUMBER/var/lib/git/demo.git git push origin
Redmineã®ããã¸ã§ã¯ãã«ç»é²ãã
æ°ããããã¸ã§ã¯ããä½æãã¦ãªãã¸ããªã®ãã¹ãç»é²
- /var/lib/git/demo.git
ææ°ãªãã¸ã§ã³ã¨ã表示ãªã©ã§é£æºã確èªã
link
åèãµã¤ã