Linux
개인 git 서버 설치 및 사용하
치우별
2023. 4. 8. 11:43
Git Core 설치
~$sudo apt-get install git-core
Data 관리될 디렉토리 생성
~$mkdir /git
새로 생성된 디렉토리 아래 저장소 생성
~$cd git
~$mkdir test
~$cd test
~$git init --bare test.git
Initialized empty Git repository in /home/ubuntu/git/test/test.git/
여기까지 서버 설정 끝
접속할 pc에서
~$git config --global user.name "임의이름"
~$git config --global user.email "임의이메일"
~$git init
Initialized empty Git repository in /home/공유 깃
~$git remote add origin ubuntu@접속ip:/home/ubuntu/git/test/test.git
~$git add *
~$git commit -m "init"
~$git push origin master