GIT的工作逻辑
GIT的安装配置
1,下载Git-2.31.1-64-bit.exe并安装
2,
git config --global user.name “Mike”
git config --global user.email “123@gmail.com”
git config --global --list
ls ~/.ssh
ssh-keygen -t rsa -C “你的邮箱”
直接赋值粘贴 .ssh的文件会破坏格式
需要打开 git bash
输入命令clip < ~/.ssh/id_rsa.pub
回车后就复制到剪切板了,到github添加ssh keys的地方直接就能粘贴上
比如我要打开E:\code有两种方法
或者gitbash跳转目录
cd 02.GitCode/
ls --列出目录文件
pwd --定位目录 print work directory
直接在电脑上打开那个文件夹,然后在文件夹空白处右键选择Git Bash here
git clone git@github.com:zhouqinhua/Dust.git
The authenticity of host ‘github.com (192.30.255.112)’ can’t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
这个错误,要输入yes
*git clone 会运行一些列git操作,包括git init ,git fetch…
clone 之后要切到子目录再操作,否则会说git not initialized