반응형
우분투 서버 만들고, GIT에서 파일 내려받고, 소스 업데이트 해서, GIT에 올리는 방법
1. 우분투 서버 git 설치
apt update
apt install git
2. git 환경 설정 저장(깃허브 아이디 및 메일)
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
3-1. 깃허브에서 소스 다운로드
git clone https://github.com/blabla~~.git
3-2. 깃허브에서 소스 다운로드(3-1)된 이후, 최신 소스 다운로드 명령어
git pull origin main
// master면 master로
4. 소스 업데이트를 위해 테스트 파일 만들어봄
echo "test" > test.txt
5. 변경된 소스코드 깃에 업로드
add => commit => push 순서를 기억하자.
git add .
git commit -m "Commit message"
git push origin main
//main or master or others
- username = 깃허브 아이디
- password = 깃허브 Personal access tokens
Personal access tokens발급방법은 아래
https://0pen3r.tistory.com/459
끝이다.
728x90
반응형
'프로그래밍 > github써보자' 카테고리의 다른 글
깃허브 push 로그인 에러 해결(fatal: Authentication failed for 에러 해결), New personal access token 발급 방법 (5) | 2025.01.17 |
---|