windows下git的安装和使用
我使用git的工具TortoiseGit(小乌龟)上传的项目,而不是用命令模式上传的项目
一、下载工具以及汉化
https://gitforwindows.org/
https://tortoisegit.org/download/
文章图片
image.png
以上两个地址都可以下载以及汉化包,根据自己电脑属性32位还是64位下载,然后一路next就ok
安装汉化的时候很多次在设置时语言就只有english而没有安装好的中文版本,也是多次安装
二、安装好语言包后设置
我在安装小乌龟的时候没有确定,然后出现一个最后弹框含有refresh的,在安装完汉化包的时候,我点了refresh刷新后,立刻出现了中文
右键->找到小乌龟->设置(setting)
文章图片
image.png
文章图片
image.png 三、检查git是否安装成功,以及创建一个库
文章图片
image.png
【windows下git的安装和使用】出现这个说明成功
四、在已有github的账号前提下登录,并创建一个库
文章图片
image.png
文章图片
image.png
创建好后的样子
文章图片
image.png 五、检查小乌龟的安装是否正常(右键->settting->常规设置)
文章图片
image.png 六、设置用户名和邮箱(右键->setting->Git)
文章图片
image.png 七、通过小乌龟很成SSH key
文章图片
image.png
点击PuTTYgen
文章图片
image.png 八、设置SSH key
在生成秘钥的途中需要一点时间,这时候你可以打开github-->setting:
文章图片
image.png
文章图片
image.png
复制红框中生成的秘钥->save private key:(将复制的key粘贴到上一步箭头所指向的框内-->Add ssh key )
文章图片
image.png 九、上传项目到gitLab
1.随便创建一个文件(我创建了一个test02文件)
文章图片
image.png
2.对文件右键--->Git在这里创建版本库---->确定(不要勾选)------>然后test02里面就会出现一个隐藏的文件夹.git
文章图片
image.png
文章图片
image.png
文章图片
image.png
- 首先打开github你所创建的库(复制HTTPS)

文章图片
image.png 十、在磁盘创建版本库(仓库) 右键,Git在这里创建版本库

文章图片
image.png
确定

文章图片
image.png
确定

文章图片
image.png 十一、设置用户名密码(右键->TortoriseGit->设置)

文章图片
image.png
确定

文章图片
image.png

文章图片
image.png Git->远端
url和推送url复制刚才从github创建项目生产的连接,远端名称在填完url和推送url自动生产origin

文章图片
image.png 十二、拉取(从GItLab或者github网上的指定仓库更新文件到本地) 右键->ToroiseGit->拉取

文章图片
image.png
确定

文章图片
image.png
确定

文章图片
image.png 十三、提交 右键->git提交->"master"

文章图片
image.png
写好注释,勾选要提交的文件

文章图片
image.png
确定

文章图片
image.png 十四、推送 右键->TortoiseGIt->推送

文章图片
image.png
成功

文章图片
image.png
进入github网站可以看到本地仓库的文件已经推送成功了

文章图片
image.png
每次提交新项目都需要从第九步开始重复执行
推荐阅读
- 开学第一天(下)
- 【故障公告】周五下午的一次突发故障
- 生活随笔|好天气下的意外之喜
- MongoDB,Wondows下免安装版|MongoDB,Wondows下免安装版 (简化版操作)
- 汇讲-勇于突破
- Android中的AES加密-下
- 说的真好
- 放下心中的偶像包袱吧
- gitlab|gitlab 通过备份还原 admin/runner 500 Internal Server Error
- Linux下面如何查看tomcat已经使用多少线程