본문 바로가기
카테고리 없음

git 사용법 정리

by 로떡 2024. 1. 16.

1. 깃허브 계정 초기설정

git config --global user.name "이름(깃허브 이름과 통일하면 좋음)"
git config --global user.email "깃허브 이메일"

 

2. 로컬저장소 지정

cd git_seoul(폴더경로)
git init

 

3. 깃허브에 파일 올리기

git add .(이건 전체파일 올리기)
git commit -m "메세지"
git push origin master
git remote

 

4. 로컬저장소와 원격저장소 연결 (안되어있다면!)

git remote -v (현재 연결된 저장소가 있는지 확인)
git remote add origin "깃허브 주소"
git push origin master
  • 연결 끊기
    git remote remove origin

출처: https://sin0824.tistory.com/8 감사합니다!