# mkdir git-test && cd $_
# echo "Hello World" > README.txt
# git init # Git 로컬 저장소를 생성, .git 디렉토리가 생성됨.
Initialized empty Git repository in /root/git-test/.git/ # 로컬 저장소
# ls -al
# git config --global user.email "test@example.com" # 버전 관리를 위해 내 정보 설정
# git config --global user.name "johnlee"
# git add README.txt # 파일을 스테이지에 올리는 명령어, 스테이징 영역은 커밋할 준비가 된 변경 내용이 로컬 저장소에 기록되기 전에 대기하는 장소
# git status
# git commit -m "add site" # 변경 사항을 로컬 저장소에 저장하는 명령어
[master (root-commit) ee0b2d0] add site
1 file changed, 1 insertion(+)
create mode 100644 README.txt
# git log
commit ee0b2d0c2c7f874e7e7ed63d42a10ecc87cbac73
Author: johnlee <test@example.com>
Date: Mon Jan 31 10:45:36 2022 +0900
add site
# echo "Aloha" >> README.txt
# git add README.txt
# git status
# git commit -m "add update"
[master 62b4357] add update
1 file changed, 1 insertion(+)
# git log
commit 62b435702d0f51da2c85ac805ca9b10923ca8854 # 커밋 해시(commit hash) : 변경 사항을 검토하거나 이전 상태로 되돌릴 때 사용
Author: johnlee <test@example.com>
Date: Mon Jan 31 10:46:06 2022 +0900
add update
commit ee0b2d0c2c7f874e7e7ed63d42a10ecc87cbac73
Author: johnlee <test@example.com>
Date: Mon Jan 31 10:45:36 2022 +0900
add site
# cat README.txt
Hello World
Aloha
# git checkout 776e5fded06e850941fd79732aa7fc005612ec4d # 커밋 복원
Note: checking out '776e5fded06e850941fd79732aa7fc005612ec4d'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 776e5fd... add site
# cat README.txt
Hello World
# git checkout -
Previous HEAD position was 776e5fd... add site
Switched to branch 'master'
# cat README.txt
Hello World
Aloha
GitHub 원격저장소 커밋
git remote add origin https://github.com/eeapbh/test-dev.git
yum install -y git
git clone https://github.com/eeapbh/test-dev.git
cd test-dev/
ls
cat README.txt
yum install -y bash-completion
# git config --global user.email "test@centos.com" # 버전 관리를 위해 내 정보 설정**텍스트**
# git config --global user.name "centos"
# cat README.txt
# echo "NIHAO" >> README.txt
# git add README.txt
# git commit -m "add list"
# git push origin master
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
EXTERNAL_URL="http://192.168.0.184" yum install -y gitlab-ce
cat /etc/gitlab/initial_root_password # 패스워드 수정
mkdir git-migration
git clone --mirror https://github.com/eeapbh/test-dev.git git-migration
cd git-migration/
git push -uf http://192.168.2.207/root/my-gitlab.git --all
--- 젠킨스 설치 https://www.jenkins.io/download/
$ sudo su -
# timedatectl set-timezone Asia/Seoul
# yum update -y
# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
# amazon-linux-extras install epel -y
# amazon-linux-extras install -y java-openjdk11
# yum install -y jenkins
# systemctl enable --now jenkins
# cat /var/lib/jenkins/secrets/initialAdminPassword # 패스워드 수정
정상적으로 잘되면 샵이생김
샵 눌러보면
추가해보기