Github와 Git의 관계
- Git이란,
코드를 효율적으로 관리하기 위함 분산형 버전 관리 시스템
- 백업 복사본 (스냅샷)
- 스냅샷을 만들어주는 과정 (commit)
- Github란,
Git Repository(저장소)를 관리할 수 있는 클라우드 기반 서비스
- Local Repository : 내 컴퓨터의 개인 저장소
- Remote Repository : 원격 온라인 서버 저장소 (공유 가능)
git config --global user.name "나의 사용자 이름"
git config --global user.email "내 이메일 주소"
Github의 기능과 Git 명령어
git restore <파일명>
git add <파일명>
/ git add.
모든 파일git commit -m '코멘트'
코멘트 작성git reset HEAD^
가장 최신의 commit 취소git push origin branch
git log
현재까지 commit된 내역 확인함꼐 작업
git init
기존 디렉토리를 Git Repository로 변환하거나 Repository를 초기화하는 데 사용합니다.git remote add origin <나의 Repository주소>
나의 Remote Repository에 연결git remote add pair <상대방의 Repository주소>
pair의 Remote Repository에 연결git pull <shortname> <branch>
내용 가져오기 -> 자동으로 병합git status
어떤 파일이 충돌하고 있는지 -> 파일 수정 후 staging area로 추가해야합니다.git add
➡️ git commit
➡️ git push orgin master
Git(Local Repository)의 세 가지 영역 및 상태
Remote Repository 페어와 공유하며 협업하기
+)
remote repository에서 origin과 upstream의 차이점