지식 창고

github 오류 해결

채영sw 2024. 11. 24. 19:17

<commit 제한>

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

 

설정 확인

git config --global --list
git commit -m "Initial commit"

 


<SSH 키>

SSH 키 생성 확인

ls ~/.ssh

SSH 키 생성
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

SSH 공개 키 복사
cat ~/.ssh/id_rsa.pub

SSH 에이전트 시작
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

SSH키 추가 여부 확인
ssh-add -l

 

github에서 SSH 등록 (settings, SSH and GPG keys)

 

연결 확인

ssh -T git@github.com

 

강제 푸시

git push -u origin main --force

 

 


<로컬 브랜치와 원격 브랜드 연결>

git fetch origin main

 


<파일 크기 제한>

Git LFS(Git Large File Storage) 사용

git lfs install

git lfs track "제한 파일"
git add .gitattributes [제한파일]
git commit -m "Track large file with Git LFS"

+ 로그 확인

git log --name-only

'지식 창고' 카테고리의 다른 글

github 2 (.gitignore , requirements.txt)  (0) 2024.11.24
github  (1) 2024.11.24
visual stdio LNK1168 쓰기용으로 열 수 없습니다 오류 해결  (0) 2024.09.11
1. 세션, 토큰, 쿠키  (0) 2024.04.03