When i open my shell , i find that the interface in the Win10 is more cool than Win7,haha , everything is growing include ourselves , ok ,let us study the method of using the shell!
Firstly , open the shell please , coding the command:git help ,than you could see the following things.
now translate them for each:
1.登录
在第一次使用的时候需要配置一些信息,你可以输入如下命令:
git config --global user.name "xxx" (xxx=yourID name)
git config --global user.email "xxxxx" (xxxxx= your email when you enroll the git)
一般情况下,以后再次使用就不用再配置咯。
2.创建线上和线下的联系
(1)打开网页版(线上)github,创建一个新的仓库,比如文件名叫做text ,注意下创建新仓库后的地址,后面会用到
(2)在本地(线下)创建仓库,仓库的名字要与线上的那个相同,比如放在D://text
cd d:
mkdir text
cd text
git init //初始化仓库
touch README //建立一个README文件,必有项
给文件添加一些内容,然后保存
git commit -m "text commit" //双引号中的内容是描述,必填项
git remote add origin https://github.com/xxx/text.git //后面的链接就是之前线上建立的新仓库的地址
这个命令有时会出现问题,如提示:
解决办法就是先输入: git remote rm origin 然后再次输入即可
git push origin master
到此我们就完成了在线上和线下创建版本库并且上传文件的过程,吼吼。