Git的使用(通过命令行, Eclipse, IDEA, Docker)
一. 通过命令行使用Git(以Windows为例) 1.安装Git-2.12.2.2-64-bit.exe 2.任何目录下, 右键, Git Bash Here 3.初次安装git配置用户名和邮箱 git config --global user.name "paul" git config --global user.email "paulandcode@gmail.com" 4.查看是否已有ssh公钥 type %userprofile%\.ssh\id_rsa.pub 若没有, 则会提示找不到文件 5.若没有, 则去生成公钥 ssh-keygen -t rsa -C "paulandcode@gmail.com" -b 4096 生成过程中会让你设置公钥路径, 直接回车使用默认路径即可还会让你设置密码, 若不设置密码, 则直接回车即可 6.添加公钥到远程仓库 cat ~/.ssh/id_rsa.pub 上面的命令会获得公钥, 然后需要你手动将公钥添加到远程仓库(如GitHub) 7.若是搭建的gitlab私服,则连接仓库时会提示无法解析主机名, 此时要在C:/Windows/Sy...