1. Git 설치하기
다운로드 Site : https://git-scm.com/downloads
2. 실행하기
1. 사용자 계정(ID) 생성
git config --global user.name "사용자ID"
2. 사용자 email 생성
git config --global user.email "이메일"
예 :
git config --global user.email iseohyun@hanmail.net
git config --global user.name iseohyun
git config --list
3. 인증서 만들기
(1) 폴더 만들기
(2) 인증서 만들기
ssh-keygen -f "파일명"
예 :
ssh-keygen -f guest
4. 인증서 등록하기
(1) Git hub 회원가입하기
GitHub: Where the world builds software
GitHub is where over 65 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
github.com
(2) 인증서 등록하기
2-1. 인증서 정보 가져오기
> 인증서가 2개 나와있음(공개키, 비밀키)
- 비밀키 : 나만 가지고 있는 키, 암호화 할 때 사용
- 공개키 : 모든 사람들에게 나누어 주는 키, 복호화 할 때 사용 (.pub 파일)
> 공개키 열어서 복사 (Ctrl + V)
2-2. 붙여넣기
- 설정 > Setting (왼쪽)
- 왼쪽메뉴에서... SSH and GPG keys > New SSH key
- 붙여넣기
5. 실습해보기
(1) 저장소 만들기
- 이름을 정함(myRepo) > 만들기 (Create repository)
우 : 클릭하면 복사가 됨
(2) 저장소 업데이트
- 내 컴퓨터에 폴더 만들기
mkdir myRepo
cd myRepo
- 붙여넣기 방법 (shift + insert)
echo "# myRepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/iseohyun/myRepo.git
git push -u origin main
- 마지막 문장을 실행하면(Enter) 로그인 알림이 나옴
(3) 새로고침
README.md 가 생성되어 있는 것을 확인 할 수 있다.
댓글