A, GIT 다운로드 및 설치
1. 바이두, 검색 상자에 "GIT 다운로드"를 입력,이 화면이 나타납니다 :
:에서 사이트에 첫 번째 클릭을 선택 https://git-scm.com/downloads
힘내 다운로드합니다
아래 그림과 같이 페이지를 입력 선택 :
GIT를 설치합니다
설치 튜토리얼 URL : https://jingyan.baidu.com/article/7f766dafba84f04101e1d0b0.html
둘째, 사용 GIT 원격 저장소에 프로젝트를 제출
디스크를 선택합니다, 새 폴더를 만듭니다. \ GITest 예 : E에. 마우스 오른쪽 버튼에서이 폴더에서,이 인터페이스가 나타납니다 "여기 GIT 배쉬의"를 클릭합니다.
2. 구성 힘내 구성 변수 사용.
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
저장소를 작성합니다
사용 git init
저장소를 생성하는 명령을 사용합니다.
이 시점에서 폴더가 .git 폴더를 표시 지정했습니다.
지정된 폴더 4. 추가 항목이있는 Readme.txt을 가지고 새 폴더 테스트는 아래와 같이 :
원격 저장소에 파일을 제출 5.. 다음과 같이 명령은 다음과 같습니다
//连接远程仓库
$ git remote add origin https://team7@183.175.14.209:6051/r/WebFramework/2017/team7.git
//解决在push过程中遇到的证书问题
$ git config --global http.sslVerify false
//输入此命令获取所有远程分支,此时会输入密码,我会单独发到微信群里
$ git pull
warning: no common commits
remote: Counting objects: 20, done
remote: Finding sources: 100% (20/20)
remote: Getting sizes: 100% (13/13)
remote: Total 20 (delta 0), reused 20 (delta 0)
Unpacking objects: 100% (20/20), done.
From https://183.175.14.209:6051/r/WebFramework/2017/team7
* [new branch] changzehui -> origin/changzehui
* [new branch] haolifei -> origin/haolifei
* [new branch] heyu -> origin/heyu
* [new branch] houbocheng -> origin/houbocheng
* [new branch] litingting -> origin/litingting
* [new branch] liuyingcong -> origin/liuyingcong
* [new branch] master -> origin/master
* [new branch] xuhaotian -> origin/xuhaotian
* [new branch] yangrunze -> origin/yangrunze
* [new branch] yuchang -> origin/yuchang
* [new branch] zhangwenjing -> origin/zhangwenjing
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
//下一步,输入转换分支的命令,我已经为大家创建好了分支,如上述第二列所示,checkout后面写的就是分支名称。
$ git checkout yangrunze
Switched to a new branch 'yangrunze'
Branch yangrunze set up to track remote branch yangrunze from origin.
//然后做一个push动作。
$ git push -u origin yangrunze
Everything up-to-date
Branch yangrunze set up to track remote branch yangrunze from origin.
//添加Test文件夹
$ git add Test
//提交 -m后写的是本次提交的说明
$ git commit -m "readme.txt"
//然后做一个push动作。
$ git push -u origin yangrunze
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 352 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Updating references: 100% (1/1)
To https://183.175.14.209:6051/r/WebFramework/2017/team7.git
fbb495a..0a8411a yangrunze -> yangrunze
Branch yangrunze set up to track remote branch yangrunze from origin.
이 시점에서, 파일 업로드가 완료되었습니다.
그런 다음 방문 https://183.175.14.209:6051 보기는 결과가 될 수있다 제출합니다.
아래와 같이 결과 :