본문 바로가기

서버운영 (TA, ADMIN)/미들웨어

[서버관리] GIT remote 지정 기본 세팅 명령어

Git global setup
git config --global user.name "Administrator"
git config --global user.email "admin@example.com"
Create a new repository
git clone http://root@{host}/jsGitLab/test.git
cd ddhp
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder
cd existing_folder
git init
git remote add origin http://root@{host}/jsGitLab/test.git
git add .
git commit
git push -u origin master
Existing Git repository
cd existing_repo
git remote add origin http://root@{host}/jsGitLab/test.git
git push -u origin --all
git push -u origin --tags