git-新手学习之路

来源:互联网 发布:淘宝卖家新手视频 编辑:程序博客网 时间:2024/05/22 14:02

刚开始学习git,从不知道git为何物开始。好记性不如烂笔头,随手一记。

一、安装核心git

1、下载核心git:https://git-scm.com/download/win   选机器对应的版本

2、安装:右键单击-常规-解除锁定 双击安装 一路next

3、查看是否安装成功:cmd git或者git --version

4、设置默认用户名、邮箱:

git config --global user.name "myName"

git config --global user.email "myName@qq.com"

git config --global push.default simple

二、安装客户端TortoiseGit

1、下载TortoiseGit:https://download.tortoisegit.org/tgit/ 选机器对应的版本 点进去下载相应的语言包

2、分别安装TortoiseGit和语言包,可一路next

3、配置:点击鼠标右键, 选择 --> TortoiseGit --> Settings

general:设置语言,设置git.exe path。git.exe path:git的安装路径 到bin。

4、设置记住密码


三、clone项目(三、四、五的前提:已配置远端)


四、提交更新

点击项目-右键TortoiseGit-提交或者commit

五、更新代码

点击项目-右键TortoiseGit-拉取或者pull

六、eclipse 更新与提交(用eclipse自带插件)

1、导入项目

2、提交:commit --> push Bransh

3、更新:pull

eclipse不能提交和更新:cannot open git-upload-pack error

解决:1、在windos ->preferences ->Team -> Git ->Configuration 配置界面增加一个环境变量配置项:http.sslVerify = false
2、在1不起作用时:将active provider值改为Direct















原创粉丝点击