Git 튜 토리 얼 설치 및 사용(공유)
목적:github 위탁 관리 프로젝트 코드 를 Git 으로 관리 합 니 다.
Git 설치
1.Git 공식 주 소 는 다음 과 같 습 니 다.https://git-scm.com/download/win

2,다운로드 완료 후,더 블 클릭 설치

3.설치 디 렉 터 리 선택

4.구성 요소 선택

5.시작 메뉴 디 렉 터 리 이름 설정

6.명령 행 환경 선택

7.아래 세 단 계 는 기본적으로 다음 단 계 를 클릭 합 니 다.



8.설치 완료

9.설치 성공 여부 확인
컴퓨터 데스크 톱 으로 돌아 가 마우스 우 클릭 으로 git 단어 두 개 를 보면 설치 에 성공 합 니 다.

Git 기본 작업 절차
1.Git 작업 영역

2.창고 에 파일 프로 세 스 추가

3.Git 초기 화 및 창고 생 성 및 작업
1.Git 설치 후 기본 정보 설정
a.사용자 이름 설정:git config-global user.name'github 에 등 록 된 사용자 이름';
b.사용자 메 일 설정:git config-global user.email'등록 할 때 메 일';
메모:이 설정 은 github 홈 페이지 에 누가 이 파일 을 제출 했 는 지 표시 합 니 다.
c.ok 설정 후 다음 명령 으로 설정 이 성공 적 인지 확인 합 니 다.
git config --list
메모:git config--global 매개 변수 입 니 다.이 매개 변 수 는 이 기계 의 모든 git 창고 에서 이 설정 을 사용 할 것 임 을 표시 합 니 다.물론 어떤 창고 에 다른 사용자 이름과 메 일 을 지정 할 수도 있 습 니 다.
2,새로운 git 창고 초기 화
a.폴 더 만 들 기
방법 1:마우스 우 클릭 가능-새 폴 더 test 1 클릭
방법 2:git 로 새로 만 들 기:$mkdir test 1

b.파일 에서 git 초기 화(git 창고 만 들 기)
방법 1:$cd test 1 직접 입력
방법 1:test 1 파일 을 클릭 하여 내 려 간 후->마우스 우 클릭 으로 Git Bash Here->$git int 입력

3.창고 에 파일 추가
방법 1:편집기 열기 로 index.html 파일 새로 만 들 기
방법 2:git 명령 을 사용 합 니 다.$touch'파일 이름'을 사용 한 다음$git add'파일 이름'을 통 해 임시 저장 소 에 파일 을 추가 하고 마지막 으로 작업 을 제출 합 니 다.


4.창고 파일 수정
방법 1:편집기 로 index.html 를 열 어 수정 합 니 다.
방법 2:git 명령 을 사용 합 니 다.$vi'파일 이름',그리고 중간 에 내용 을 쓰 고 마지막 에 작업 을 제출 합 니 다.

5.창고 파일 삭제
방법 1:편집기 에서 삭제 할 파일 을 직접 삭제 합 니 다.
방법 2:git 삭제:$git rm'파일 이름'을 사용 한 후 제출 작업

4.Git 원 격 창고 관리
1.원 격 창 고 를 사용 하 는 목적:백업,코드 공유 집중 화 관리 실현
Git 원 격 창 고 는 서버 에 있 는 git 창고 파일 입 니 다.



Git 클론 작업
목적:원 격 창고(github 에 대응 하 는 항목)를 로 컬 로 복사 합 니 다.
1.코드:git clone 창고 주소
창고 주소 의 유래 는 다음 과 같다.

2.클론 프로젝트

3.로 컬 창 고 를 git 원 격 창고 에 동기 화:git push

그 동안 오류 가 발생 한 경 우 는 다음 과 같 습 니 다.
a、제출 오류 발생

해결:Git GUI 를 통 해 제출 할 때 발생 하 는 오류 입 니 다.git 폴 더 에 있 는 파일 을'읽 기 전용'으로 설정 하여'git 폴 더 에 있 는 모든 파일,폴 더 및 하위 파일 의 읽 기 전용 속성 을 제거 하면 됩 니 다.

b.동기 화 할 수 없 거나 권한 이 없 는 경우 해결 방법 은 다음 과 같 습 니 다.
사용자 이름과 비밀 번 호 는 github 의 것 과 일치 해 야 합 니 다.

이상 의 Git 설치 와 사용 도문 강좌(공유)는 여러분 에 게 공 유 된 모든 내용 입 니 다.여러분 에 게 참고 가 되 고 저희 도 많이 응원 해 주시 기 바 랍 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ZoopKeeper 시각 화 zkui 프레임 워 크프로필 zkui 는 zookeeper 에 웹 관리 인터페이스 를 제공 하여 zookeepr 의 노드 값 을 CRUD 로 조작 할 수 있 고 안전 인증 도 제공 합 니 다.github 주소:https://github....
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.